<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Here is a script which Brian uses to rebase and merge selected PR's.<br>
Could be handy.<br>
<br>
HTH,<br>
Ondra<br>
<br>
<br>
<div class="moz-forward-container"><br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Re: Git pull request automation?</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Tue, 30 Apr 2013 09:47:20 -0500</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>Brian Stansberry <a class="moz-txt-link-rfc2396E" href="mailto:brian.stansberry@redhat.com"><brian.stansberry@redhat.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>Ondrej Zizka <a class="moz-txt-link-rfc2396E" href="mailto:ozizka@redhat.com"><ozizka@redhat.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
<td>Carlo de Wolf <a class="moz-txt-link-rfc2396E" href="mailto:cdewolf@redhat.com"><cdewolf@redhat.com></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>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
</pre>
<br>
</div>
<br>
</body>
</html>