cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhi...@apache.org
Subject cordova-coho git commit: Update PR merging instructions
Date Fri, 05 Jun 2015 23:02:09 GMT
Repository: cordova-coho
Updated Branches:
  refs/heads/master 01f5e0668 -> 58af213a7


Update PR merging instructions


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/58af213a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/58af213a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/58af213a

Branch: refs/heads/master
Commit: 58af213a7ab95cc3f3fee1c6a993f1b82ddbd576
Parents: 01f5e06
Author: Nikhil Khandelwal <nikhilkh@microsoft.com>
Authored: Fri Jun 5 16:01:33 2015 -0700
Committer: Nikhil Khandelwal <nikhilkh@microsoft.com>
Committed: Fri Jun 5 16:01:33 2015 -0700

----------------------------------------------------------------------
 docs/committer-workflow.md       |  2 +-
 docs/processing-pull-requests.md | 21 ++++++++++++++-------
 src/merge-pr.js                  |  9 ++++++++-
 3 files changed, 23 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/58af213a/docs/committer-workflow.md
----------------------------------------------------------------------
diff --git a/docs/committer-workflow.md b/docs/committer-workflow.md
index 3872629..2e186ec 100644
--- a/docs/committer-workflow.md
+++ b/docs/committer-workflow.md
@@ -101,7 +101,7 @@ When possible, try to phrase things in the form of a proposal. If no one
objects
 
 ### Step 6: Ask for a code review (_optional_)
  * Do this if you want a second pair of eyes to look at your code before it goes in.
- * Use either [reviewboard](code-reviews.md) or a GitHub pull request.
+ * Use GitHub pull request.
 
 ### Step 7: Push your change
  * When possible, rebase & squash your commits

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/58af213a/docs/processing-pull-requests.md
----------------------------------------------------------------------
diff --git a/docs/processing-pull-requests.md b/docs/processing-pull-requests.md
index fb81e2e..683e7ca 100644
--- a/docs/processing-pull-requests.md
+++ b/docs/processing-pull-requests.md
@@ -33,6 +33,8 @@ 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
@@ -65,12 +67,17 @@ _Thanks for the pull request. I've had a look at it and think it looks
good. Bef
 ## Step 3: Merge the change
 Run the following as an exemplary way to merge to master:
 
-    # Pro Tip: coho list-pulls will generate the following commands for copy&paste
-    git pull https://github.com/GitHubUser/cordova-FOO BRANCH
-    git rebase origin/master -i
-
-The rebase step will let you interactively review the changes being made to master. You should:
-
+    coho merge-pr --pr <pr#>
+    
+This command will do the following:
+* Update your local master.
+* Fetch the PR and create a branch named `pr/pr#`
+* Attempt a `--ff-only` merge to master. If this fails then: 
+    * Perform a rebase of the `pr/pr#` branch.
+    * Attempt a `--ff-only` merge to master. 
+    * On success, it will modify the last commit's message to include. 'This closes #pr'
to ensure the corresponding PR closes on pushing to remote.
+
+You should:
  * Squash as many commits as is reasonable together.
  * Re-write commit messages to include JIRA issue numbers in the form CB-#### (no "[]"'s,
no ":")
  * In the final commit message (if there are multiple), [tell GitHub to close the pull request](https://help.github.com/articles/closing-issues-via-commit-messages)
@@ -104,7 +111,7 @@ If the author is set to YOU, and you'd like to reset it to the original
author,
    * Refer to [committer-workflow.md](committer-workflow.md) for how to test each repo.
  * If it would be appropriate to write a test
    * Either write one yourself, or ask the author to do so.
-     * If you write one yourself, commit it in a follow-up (don't squash it with theirs)
+   * If you write one yourself, commit it in a follow-up (don't squash it with theirs)
 
 ## Step 6: Push the change
 

http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/58af213a/src/merge-pr.js
----------------------------------------------------------------------
diff --git a/src/merge-pr.js b/src/merge-pr.js
index 736a788..79f2ffe 100644
--- a/src/merge-pr.js
+++ b/src/merge-pr.js
@@ -35,6 +35,13 @@ module.exports = function *(argv) {
     argv = opt
         .usage('Merges the pull request to master\n' +
         '\n' +
+        'This command will:\n' +
+        '* Update your local master. \n' +
+        '* Fetch the PR and create a branch named `pr/pr#`\n' +
+        '* Attempt a `--ff-only` merge to master. If this fails then: \n' + 
+        '    * Perform a rebase of the `pr/pr#` branch. \n' +
+        '    * Attempt a `--ff-only` merge to master. \n' +
+        '    * On success, it will modify the last commit\'s message to include. `This closes
#pr` to ensure the corresponding PR closes on pushing to remote. \n\n' +
         'Usage: $0 merge-pr --pr 111')
         .argv;
    if (argv.h) {
@@ -83,7 +90,7 @@ module.exports = function *(argv) {
            console.log('Commits merged:');
            console.log('---------------');
            console.log(commits);
-           console.log(chalk.red.bold('Please test, squash, and rebase to meaningful commits
before pushing. '));
+           console.log(chalk.red.bold('Success! Please test, squash, and rebase to meaningful
commits before pushing to remote master using: git push origin master'));
        } else {
            console.log(chalk.red.bold('Nothing to merge - Has this already been merged?'));
        }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message