Pull requests propose to merge changes from one branch with another. In Backlog, you can notify other members to review changes before they’re integrated, see what’s changed in the source code, and add comments to the code.
In this overview, we’ll go over how to:
- View pull requests
- Add pull requests
- Edit pull requests
- Comment on pull requests
- Merge pull requests
- Close pull requests
View pull requests
In the project’s Git:
- Find the repository you want to search.
- Select the “Pull requests” tab.
- Review the list of open pull requests. Use the “Status” filter at the top to see closed or merged pull requests. You can also search by registrant, assignee, and keyword.
Add pull requests
There are two ways to add a pull request:
- Select the “New pull request” button on the top right of the project’s pull requests page.
- Add them from the “Branches” tab or when comparing branches and tags.
When using the “New pull request” button, you’re redirected to a new page.
- Select the target branch (base or main) and feature branch (the branch containing the new changes to be merged) from the dropdown menus. These can’t be changed after the pull request is added (you’ll need to close the pull request and add a new one).
- The updated commits and files (diffs) are shown at the bottom. Differences in binary files (e.g., updated PNG image) aren’t shown.
- Add a subject (required).
- Choose an assignee to review and merge the pull request. They’ll get a notification unless you set yourself as the assignee. You can also notify members using the @mention in the description field.
- Select the related issue, which will link it to the pull request and add a pull request link to the issue details page under the “Pull requests” tab.
- To delete the branch, check the “Delete branch” box after the pull request is merged.
Good to know
When the feature branch name includes the issue key, the issue’s subject is automatically added to the pull request’s “Subject” field and the key is referenced in the “Related issue” field. These can be changed manually if needed.Edit pull requests
To edit a pull request:
- Select it from the list on the “Pull requests” page.
- Select “Edit.”
- Make any changes.
- Select “Save.”
Comment on pull requests
To comment on a pull request, select the “Comment” tab on the pull request details page. You can also use @mention to notify members and teams. Unlike issues, replying to pull request email notifications won’t post directly to Backlog.
Comments can also be added to a section of code. To comment on code:
- Select the “Files” tab on the pull request details page.
- Hover over any line of code, and select “Comment.”
- Add your comment.
- Select “Submit.”
Merge pull requests
To merge a pull request, select “Merge” on the pull request details page to merge the feature and target branches.
If there’s an error, resolve the conflict in your code editor and merge the branches on another tool or command terminal. You can also try pushing the resolved code to the branch and merging the pull request again.
Close pull requests
To close a pull request without merging the branches, select “Close” and add an optional comment notifying members. Remember to close the pull request rather than deleting the associated feature branch.