It's important to actually 'merge' a Pull Request, and not just apply its commits to a branch (be it master or a release branch).
We cannot simply press the button on GitHub, as we only have read-only access. Instead, we merge the PR branch and then push to Apache Git, which then mirrors to GitHub.
The first time, you need to setup the merge scripts. You can find them here in the Apache CloudStack repository.
Put the scripts in your $PATH somewhere, so you can run 'git-pr' and 'git-fwd-merge' without specifying the paths. Git will recognise this, and allow you to use 'git pr' from any directory.
In order to merge a Pull Request, you need at least two remotes:
The names of the remotes are not important, as the script tries to detect the GitHub remote.
If your output doesn't look like this, then add a remote like this:
A script was developed to make this an automated and easy process.
PS: For those of you who used the 'git pr' alias developed by Rohit Yadav, you can also feed this script with the full PR url (like the alias required). This way, we made it fully backwards compatible so it should be easy to use this script instead and actually merge (instead of patch).
We made the script smart, so it will prevent you from doing things that seem not OK. Still, please check the results before you proceed.
You'll have one merge commit, and the exact commits from the Pull Request. Using 'git status' you can check if the number makes sense.
Final step is to push to the Apache git repo. Please check how your Apache repo is named (mine is 'upstream'). Check using 'git remote -v'
Your commit is pushed to Apache Git, which mirrors to github.com. It should arrive within a minute and set the PR to 'merged' state (it does this based on the commit hashes).
You should also see your commits in the list of latest commits.