⇦ Back to: Push | ⇧ Overview | ⇨ Next: Review Pull Request
<aside> 📚 A Pull Request (PR) says “I want to merge these changes into our project. What do you think?”
</aside>
The process of making a PR is: - Push your commit(s) to a GitHub repository. - Create a new pull request for that branch on the GitHub Pull Requests page.
Open the GitHub Pull Requests page for the shared repository.
<aside> 💡 It is possible to create a pull request from a forked repository, which is a duplicate in another place on GitHub, e.g. in your private account. We don’t recommend using this facility in most cases at Brown. PRs based on forks don’t have access to the GitHub secrets, which may be required for correctly running the PR checks or build scripts, making it impossible to merge the PR if branch protection rules are implemented. In some cases, running the build scripts requires the commits for the PR to be in the shared repository directly, leading to strange errors. If you don’t have to, don’t use forks.
</aside>
Click on “New pull request”
Choose the branches to compare:
Add a conventional title like
Add a description
Add a reference to the issue you’re fixing by typing “closes #” and then a keyword from the issue; select the correct issue from the list.
<aside> 💡
See the full list of keywords like “closes” here: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
</aside>
Add a few reviewers (2-5 is a good number, including at least one owner of the repository and at least one peer. Try the person next to you in the room or on Zoom.)
On the “create pull request” button, there is an arrow. Click this, and select “Draft pull request.”
At this stage, you can check that everything is in place.
If you realise you need to do more work on the code, then make some more commits on the same branch and push them using GitHub Desktop or git push
. The PR will update automatically.
When you click “ready for review” at the bottom of the pull request conversation, the reviewers will be informed that you’ve requested their review.