Skip to content
This repository has been archived by the owner on Oct 4, 2018. It is now read-only.

Handling Pull Requests (Steve)

sebersole edited this page Mar 2, 2012 · 3 revisions

This is a page to describe the process I follow for integrating pull requests, mainly so I don't keep forgetting ;)

Get the user's changes.

I prefer to base the integration directly on the user's branch. I will "rebase in" master in a later step. But this lets me work in exactly the context they were working in (same starting parent, etc):

git fetch <remote-fork-url> <remote-branch-name>:<local-branch-name>

Check their work

This involves:

  • verifying the changes, which mostly involves running the tests (most likely you will need to use gradlew!)
  • checking code style
  • checking commit messages (i.e., making sure they reference the JIRA issue key) and amending any bad commit messages.

I tend to just fix small issues. Big issues get kicked back.

Rebase

Now its time to bring their branch up to date with whatever upstream branch I am targeting (usually master). After rebase, I again run tests.

Merge into target branch

Because of the rebase above this should be a fast forward. If not, keep redoing the rebase step + fetching/pulling the target branch until the merge does fast forward. I use the --ff-only option here, as I do not want any non fast forward merges to go through; those discrepencies should be dealt with by rebasing back on the integration branch.

Push

Now I am finally ready to push the integration back upstream. Additionally, it is time to clean up that integration branch.