Skip to content

Creating a pull request

Mariana Caldas de Souza edited this page May 16, 2022 · 10 revisions

Creating a Pull Request

You can also watch the tutorial on YouTube.

  1. Once you have your work done in your branch, it's time to do the first review locally, which means checking the files you've changed to make sure:

    • Remove any unnecessary console.logs
    • Make sure there are no indentation problems
  2. Be sure to test your feature extensively in many screen sizes (you can use the Inspect tool on your browser to simulate those screens), and make sure there are no console errors nor any other section or feature was affected by your change.

  3. Once everything is committed, tested and ready to be shipped, run git push --set-upstream origin [new-branch] or git push origin -u [new branch].

    • This will create a new Pull Request for you, setting the origin from your [new-branch] with the changes you want to merge into the master branch.
    • From now on, whenever you need to push to your PR, you just need to add, commit and run git push.
  4. Refresh the repo on GitHub, and you should see a green button saying “Compare & pull request”. Click on this button.

  5. Populate all the changes added to the Pull Request in the description box, making sure to answer all of the questions fully. At the top of the text box, change the default link to the corresponding Issue link, and change the number to the Issue number.

Answer the questions that come up by default. For reference, these are the questions to keep in mind:

  • Have you updated the CHANGELOG.md file? If not, please do it.
  • What is this change?
  • Were there any complications while making this change?
  • How did you verify this change?
  • When should this be merged?
  1. Now, it is time to assign yourself to the PR, which means we're responsible for merging it before it gets properly reviewed (attached), and linking the PR with its issue so that once the PR is merged, the issue is automatically closed (attached)

assign-yourself-link-issue


merge-PR


About DRAFT Pull Requests

GitHub also provides a way of submitting your code before it is ready for review, the DRAFT Pull Requests. That is useful to get support or clarify points with the team and.

Please create a DRAFT PR instead of a regular one in case you are still working with your feature and add the label work in progress. No reviewer should be added to the PR until it is ready for review.

You can also watch the tutorial on YouTube.