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
.
Examples
- GitHub
- Bitbucket
GitHub template
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
Bitbucket template
https://bitbucket.org/exampleOrg/exampleRepo/pull-requests/new?source={{source}}/1&dest={{destination}}
An example pull request URL generated from the above template for merging a branch named feature
to branch main
would look like:
https://bitbucket.org/exampleOrg/exampleRepo/pull-requests/new?source=feature/1&dest=main
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.
Merged Externally
After you merge any branch remotely:
- Open your Prophecy project.
- Go to the Merge step of the Git dialog.
- Click Merged Externally and Confirm.