Pull request templates
Prophecy supports opening pull requests on your external Git provider to merge development branches to a base branch on a remote repository.
You will not see this option if using Prophecy-managed Git for your Project.
Enable Pull Request Template
To enable pull requests:
- Open your Project metadata.
- Open the Settings tab.
- Next to Pull Request Template, toggle on the Enabled button.
- Review the template URL.
The PR template URL requires two variables which are used to build a URL string. The {{source}}
variable represents the active development branch, and the {{destination}}
variable represents the base branch to which the development branches need to be merged to, like main
.
The template URL will be automatically generated depending on your configured external Git provider. This auto-generation is currently being done for GitHub, GitHub Enterprise, Gitlab, Gitlab Enterprise, BitBucket, and Azure Devops repositories. You can also edit the autogenerated templates.
Example template for a GitHub repository:
https://github.com/exampleOrg/exampleRepo/compare/{{destination}}...{{source}}?expand=1
An example pull request URL generated from the above template for merging a branch named feature
to branch main
would look like:
https://github.com/exampleOrg/exampleRepo/compare/main...feature?expand=1
Open Pull Request
If the pull request template is configured correctly and enabled, you can open a pull request during the Merge step of the Git process.
When you open a pull request from the Prophecy interface, Prophecy will redirect you to your external Git provider based on the template defined in the Project Settings tab.