[windup-dev] Github PR rebase script // Fwd: Re: Git pull request automation?

Lincoln Baxter, III lincolnbaxter at gmail.com
Thu Aug 7 14:08:09 EDT 2014


Whatever works for you :)

You don't need to add the remote, just copy the text from Github... it
tells you how to do it right in the PR (just click "Use thh command line"
to see the instructions)

git checkout -b lincolnthree-WINDUP-133 master
git pull https://github.com/lincolnthree/windup.git WINDUP-133


Then run the tests "mvn clean install", and if they pass:

git checkout master
git merge --no-ff lincolnthree-WINDUP-133
git push origin master


Hope this helps,
~Lincoln

On Sat, Aug 2, 2014 at 7:20 AM, Ondrej Zizka <ozizka at redhat.com> wrote:

>  Here is a script which Brian uses to rebase and merge selected PR's.
> Could be handy.
>
> HTH,
> Ondra
>
>
>
>
> -------- Original Message --------  Subject: Re: Git pull request
> automation?  Date: Tue, 30 Apr 2013 09:47:20 -0500  From: Brian
> Stansberry <brian.stansberry at redhat.com> <brian.stansberry at redhat.com>  To:
> Ondrej Zizka <ozizka at redhat.com> <ozizka at redhat.com>  CC: Carlo de Wolf
> <cdewolf at redhat.com> <cdewolf at redhat.com>
>
> AIUI Carlo's team is building some automation around this for EAP.
>
> I have a simple script I use to bring down a bunch of pull requests into
> a single branch.[1] I then push that branch to upstream master-ignore.
> Lightning and Tomaz Cerar's team city test that branch whenever changes
> are made. If that goes well, I merge the branch to master and push.
>
> The other mergers do similar things, probably with better scripts for
> the first bit.
>
> I don't use the requester's remote; the PR is available via the wildfly
> github repo. See the script for details.
>
> [1]
>
> pull() {
>   cmd="git fetch upstream master "
>   for var in "$@"
>   do
>     cmd="$cmd pull/$var/head:pullRequest$var"
>   done
>
>   $cmd
>
>   git branch -D pulls
>   git checkout master
>   git rebase upstream/master
>   git checkout -b pulls
>
>   for var in "$@"
>     do
>     git checkout pullRequest$var
>     git rebase pulls
>     git checkout pulls
>     git merge pullRequest$var
>     git branch -D pullRequest$var
>   done
> }
>
> On 4/30/13 9:16 AM, Ondrej Zizka wrote:
> > Hi Brian,
> >
> > if I want to test and review the pull request before merging, it seems
> > that I have to add the requester's remote, fetch it, check out his
> > branch, then do what I want.
> >
> > With the pace of PRs to AS, I assume you have some automation for this,
> > perhaps through GitHub API. Is that available somewhere?
> > Or how do you proceed when you need to check something in an IDE, or
> > test something not covered by the testsuite, etc?
> >
> > Thanks,
> > Ondra
>
>
> --
> Brian Stansberry
> Principal Software Engineer
> JBoss by Red Hat
>
>
>
>
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev
>



-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/windup-dev/attachments/20140807/1a392b8a/attachment-0001.html 


More information about the windup-dev mailing list