Fetch pull requests from upstream
Committers need to review and merge pull requests which are submitted to the GitHub mirror (upstream remote).
To checkout a specific pull request in a separate branch you need to know its ID (<PR_ID>), which is available from https://github.com/apache/incubator-samoa/pulls
You can checkout the pull request in a local branch, typically named after the JIRA issue that tracks the modification (<SAMOA-XX>).
If you followed the configuration advice in Development Environment you can simply checkout the pull request directly as a local branch.
git checkout -b <SAMOA-XX> upstream/pr/<PR_ID>
Otherwise, you can fetch the pull request directly from the upstream remote.
git fetch upstream pull/<PR_ID>/head:<SAMOA-XX>
git fetch upstream pull/PR_ID/head:SAMOA-XX
remote: Counting objects: 1, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
* [new ref] refs/pull/PR_ID/head -> SAMOA-XX
Now you can test the pull request locally.
Merge a pull request
Once you are happy with the changes in a pull request and are ready to merge it, you need to: checkout the base branch (master or gh-pages), merge the branch, commit it, and push it to the official Apache git repository.
In this example, I assume the change is a code change applied to master. For documentation changes the process is the same but applied to the gh-pages branch. Additionally, you need to publish the website as described in Publish Website.
git checkout master
git merge --squash SAMOA-XX
Now you have the changes from the pull request staged on your master branch, and can do some final adjustments. When you are ready to commit the changes:
The default comment starts with:
Squashed commit of the following:
Remove all the comments and leave only a single line comment with the JIRA issue, the title of the PR, and "Fix <PR_ID>". For example, if the PR_ID is 123:
SAMOA-XX: Awesome new feature. Fix #123
Now you are ready to push the commits to the official Apache repository.
git push apache
Congratulations! You are done
If you committed to the gh-pages branch remember to publish the updated website.