Skip to main content

PR template

Configure pull request (PR) template URLs

When changes are committed on a branch in the IDE, dbt Cloud can prompt users to open a new Pull Request for the code changes. To enable this functionality, ensure that a PR Template URL is configured in the Repository details page in your Account Settings. Note: If this template URL is unset, then the IDE will instead show a prompt to merge the changes directly into the master branch.

Open a PR in the IDE

Open a PR in the IDE

The PR template URL supports two variables which can be used to build a URL string. These variables, {{source}} and {{destination}} return branch names based on the state of the configured Environment and active branch open in the IDE. The {{source}} variable represents the active development branch, and the {{destination}} variable represents the configured base branch for the environment, eg. master.

A typical PR build URL looks like:{{destination}}..{{source}}

Configure custom branches

By default in Development Environments, dbt Cloud attempts to reference the main branch in connected repositories. If you want to use a different default branch name, you can configure dbt Cloud with a custom branch setting.

For example, you can use the develop branch of a connected repository. Edit an environment, then in "General settings" select Only run on a custom branch , and in "Custom branch" type develop or the name of your custom branch.

Configuring a custom base repository branch

Configuring a custom base repository branch

Example templates

Some common URL templates are provided below, but please note that the exact value may vary depending on your configured git provider.


If you're using Github Enterprise your template may look something like:




AWS CodeCommit<repo>/pull-requests/new/refs/heads/{{destination}}/.../refs/heads/{{source}}

Azure DevOps<org>/<project>/_git/<repo>/pullrequestcreate?sourceRef={{source}}&targetRef={{destination}}