How to configure a repository to use a specific environment of a forge app from dynamic pipelines

I want to do is that the dev branch points to the dev environment and the prod branch to the production environment.