For a visual walkthrough, see slides from ApacheCon 2015 talk on Committer Tools.
Find what requests need attention by looking at the GitHub page.
To look at them in aggregate:
coho list-pulls | tee pulls.list | less -R
Alternatively, you can navigate to http://s.apache.org/cordovaPulls to see all PRs for Cordova repos.
To filter out those that you last commented on:
coho list-pulls --hide-user=agrieve
To show only certain repos:
coho list-pulls -r js -r android -r plugin-inappbrowser
To close a pull request that is no longer relevant / active:
Thanks for the pull request. I‘ve had a look at it and think it looks good. Before we can merge it though, you need to sign Apache’s Contributor License Agreement (can be done online): http://www.apache.org/licenses/#clas
There are two ways to merge a PR.
The goal is to have one or more commits in master
that are connected to both the original author and you as the committer, and include the JIRA issue number in the form CB-#### (no “[]”'s, no “:”).
Example commit message:
CB-6124 Make `cordova plugin remove` resilient to a missing plugin directory This breaks a couple prepare tests that Andrew deletes in the next commit. github: close #57
GitHub offers a simple way to merge PRs using its UI. “Squash and merge” will squash all commits together, “Merge pull request” create one merge request of the changes. Both will let you set or edit the commit message. If the original author already did a great job with commits and its commit messages, you also can “Rebase and merge” the PR directly onto master
.
coho
Run the following as an exemplary way to merge to master:
coho merge-pr --pr <pr#>
This command will do the following:
pr/pr#
--ff-only
merge to master. If this fails, then:pr/pr#
branch.--ff-only
merge to master.You then should:
Git keeps track of the author of commits separately from the committer of the commit.
Typically, both of these values are set to the person submitting the pull request. After your pull/merge/rebase/whatever work, you may find the values have changed - or not. What we would typically be looking for is the final commit to have YOU as the committer and the original author as the author.
You can check these fields with the following command:
git log --pretty=full
If the author is set to YOU, and you'd like to reset it to the original author, you can amend the commit:
git commit --amend --author=some_author_id_here
git push