Skip to contentSkip to conversation

Merging PRs on the command line

DISCUSSION Ken Dreyer 4 participants 4 messages May 12, 2015 – May 13, 2015

lore
Share & tools
lore

Ken Dreyer

author
#0 lore raw

Hi Loic,

I was reading over some of the HOWTO docs in the wiki, and saw the steps here:

http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_populate_the_integration_branch

It looks like you're using curl to get the title of the PR, populating the commit message, etc.

I've found that GitHub's "hub" utility is really great for simplifying this. I typically merge PRs in GitHub by running the following in my local clone:

git checkout master
git pull
hub merge https://github.com/ceph/ceph/pull/4658
git commit --amend (to add my "Reviewed-by" line to the merge commit) git push

The hub utility uses GitHub's APIs to automatically add a non-fast-forward commit with a "regular" commit message that looks more-or-less identical to the one that I'd get if I clicked the "Merge" button in the web UI.

The thing that sold me on this is that all the merge commits are authored by "[email protected]" instead of my personal email address. I found that when I clicked the "Merge" button in GitHub's web UI, the merge commits were authored by my primary email address for my "ktdreyer" GitHub UID, which isn't really what I want for Ceph.

- Ken

#1 lore raw
Quoted 25 lines · Ken Dreyer

Hi Loic,

I was reading over some of the HOWTO docs in the wiki, and saw the steps here:

http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_populate_the_integration_branch

It looks like you're using curl to get the title of the PR, populating the commit message, etc.

I've found that GitHub's "hub" utility is really great for simplifying this. I typically merge PRs in GitHub by running the following in my local clone:

git checkout master
git pull
hub merge https://github.com/ceph/ceph/pull/4658
git commit --amend (to add my "Reviewed-by" line to the merge commit) git push

The hub utility uses GitHub's APIs to automatically add a non-fast-forward commit with a "regular" commit message that looks more-or-less identical to the one that I'd get if I clicked the "Merge" button in the web UI.

Quoted 5 lines

The thing that sold me on this is that all the merge commits are authored by "[email protected]" instead of my personal email address. I found that when I clicked the "Merge" button in GitHub's web UI, the merge commits were authored by my primary email address for my "ktdreyer" GitHub UID, which isn't really what I want for Ceph.

I've been using hub for cbt PRs as well ala:

http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VVJ3zn_qpt4

It's absolutely heavenly.

Mark

#2 lore raw
In reply to Ken Dreyer

Hi Ken,

That's handy, thank you :-)

Cheers

Quoted 37 lines · Ken Dreyer

Hi Loic,

I was reading over some of the HOWTO docs in the wiki, and saw the steps here:

http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO_populate_the_integration_branch

It looks like you're using curl to get the title of the PR, populating the commit message, etc.

I've found that GitHub's "hub" utility is really great for simplifying this. I typically merge PRs in GitHub by running the following in my local clone:

git checkout master
git pull
hub merge https://github.com/ceph/ceph/pull/4658
git commit --amend (to add my "Reviewed-by" line to the merge commit) git push

The hub utility uses GitHub's APIs to automatically add a non-fast-forward commit with a "regular" commit message that looks more-or-less identical to the one that I'd get if I clicked the "Merge" button in the web UI.

The thing that sold me on this is that all the merge commits are authored by "[email protected]" instead of my personal email address. I found that when I clicked the "Merge" button in GitHub's web UI, the merge commits were authored by my primary email address for my "ktdreyer" GitHub UID, which isn't really what I want for Ceph.

- Ken
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
#3 lore raw
In reply to Ken Dreyer
Quoted 5 lines · Ken Dreyer

The thing that sold me on this is that all the merge commits are authored by "[email protected]" instead of my personal email address. I found that when I clicked the "Merge" button in GitHub's web UI, the merge commits were authored by my primary email address for my "ktdreyer" GitHub UID, which isn't really what I want for Ceph.

I thought this was solved by setting a secondary email as the organization's default email, but now I see how wrong I was. Merge commits do go with my primary :(

-Joao