Skip to content

Protocol for doing a pull request

Ross Clements edited this page Sep 10, 2015 · 1 revision

There will be prospective of 2 users, the person requesting the pull request (developer) and the person who is accepting the pull request (approver)

1. Developer

  1. The developer has written and tested his code to the level at which it meets the criteria of done.
  2. The developer checks to ensure they have not left in redundant code, comments or debugging information.
  3. The developer does his final commit and then does a "git push origin branchname".
  4. The developer goes to the repositories pull requests section most likely located here and click on "New pull request.
  5. The developer will then select the branch they were working on in the compare drop down.
  6. The developer can now check their changes and when they are finished and feel happy the developer can click "Click to create a pull request for this comparison" at the top of the page to submit their pull request.

2. Approver

  1. The Approver can view all the current pull requests on here.
  2. The Approver clicks on the pull request they would like to work with.
  3. The Approver can now read through all of the changed code, it is the Approvers responsibility as the last line of defence between the developers branch and master branch to ensure the code is of high enough quality and suits its purpose as a feature outlined.
  4. When this is complete and you have made you decision you can either decide to merge the request if it meets the criteria or to close the request if it is not(both options are towards the bottom of the page), we close the request to make sure no one else comes along and accidentally merges it.

3. Developer (If your request has been closed by an Approver)

  1. In the event that your pull request is rejected your branch will still exist on the repo so the developer can continue working on the branch and can work on the reasons that the request was closed.
  2. The developer should do the first 3 steps from the original request steps.
  3. The developer at this stage you can recheck your changes by going to your branch on Github as it is your last opportunity to do so before you reopen your pull request.
  4. The developer instead of clicking new pull request you click on "closed" and go into your previously closed pull request.
  5. This will not reflect your new changes yet which is why in step 3 you are asked to look at your branch to be sure it is correct, when the developer click's "Reopen" at the bottom of the page your changes from you branch will then be reflected. Once you have done this then you are finished and an Approver will do his/her process again.