One gotcha that has bit me before-- if the PR isn't rebased over the current 
master (assuming you are merging into master) it may still be merge-able 
because maybe there aren't any conflicts. (E.g. maybe no one has worked on that 
section of the codebase since the PR's branch was branched.)

But if you merge without rebasing, Apache's mirroring won't realize that the PR 
should be closed (as I understand it, because the commits will have different 
hashes since they are diffs between different places on the tree). So best to 
rebase if needed, but you forget and this happens to you, you can still rebase 
and force-push the PR branch, and then Apache's mirroring will catch up and 
close the PR "posthumously". Or of course you can always close it manually on 
Github.

I make this mistake about once a month or so. :(

ajs6f

> On Mar 14, 2018, at 12:27 PM, Matt Sicker <boa...@gmail.com> wrote:
> 
> When you have a GitHub origin, you can checkout pulls/42/head to check out
> PR#42. You can pull/merge from that branch as well to merge the PR (by
> committing and pushing that merge, GitHub will notice and mark the PR as
> merged). You can also use the "hub" command line tool that GitHub publishes
> which adds a bunch of convenience commands to do the same thing.
> 
> On 14 March 2018 at 10:19, Gilles <gil...@harfang.homelinux.org> wrote:
> 
>> Hi.
>> 
>> On Wed, 14 Mar 2018 14:16:42 +0000, Otto Fowler wrote:
>> 
>>> I should be more specific, this is for looking at github pr’s.
>>> So if your submitters are forking, submitting prs on github.
>>> 
>>> We also have scripts for committing, but we are doing git -> github mirror
>>> 
>> 
>> My knowledge of "git" is small; my knowledge of GitHub smaller
>> (and zero for functionalities that require being logged in). :-}
>> 
>> Assuming a "git" repository (where "origin" is on an Apache server)
>> with a local "clone" (i.e. on my machine), is it possible to create
>> a branch, say "gimo_work", such that
>> 
>> $ git checkout gimo_work
>> $ git ... ? ... (equivalent to "pull" wrt "origin")
>> 
>> will retrieve the latest Gimo's commits on the fork made
>> from the Apache repository?
>> 
>> Gilles
>> 
>> On March 14, 2018 at 10:15:04, Otto Fowler (ottobackwa...@gmail.com)
>>> wrote:
>>> 
>>> We have script to help reviewers checkout PR’s in git, either in their own
>>> repo
>>> or just doing it in ~/tmp or something into a new repo.
>>> 
>>> So, I would run:
>>> 
>>> checkout-pr 999
>>>> 
>>> 
>>> in the tmp directory, and end up with a local version that I can then
>>> build
>>> and do whatever with.
>>> would that help?
>>> 
>>> 
>>> On March 14, 2018 at 10:08:47, Gilles (gil...@harfang.homelinux.org)
>>> wrote:
>>> 
>>> On Tue, 13 Mar 2018 11:43:17 -0400, ajs6f wrote:
>>> 
>>>> On Mar 13, 2018, at 11:20 AM, Gilles <gil...@harfang.homelinux.org>
>>>>> wrote:
>>>>> 
>>>>> 
>>>>> I didn't find it very easy to cooperate with developers who fork on
>>>>> GitHub and submit PRs. I've now found the "git" command that creates a
>>>>> branch from a PR, but it would be so much more comfortable to just
>>>>> switch directory and do "git pull".
>>>>> 
>>>>> 
>>>> Just as a point of information, it is possible to reverse the Github
>>>> <- Apache mirroring most projects use to be Github -> Apache.
>>>> 
>>> 
>>> It seems that a good-enough-for-me solution would be to "clone"
>>> (on my local system) the repository forked by the GSoC participant.
>>> 
>>> Does it make sense?
>>> 
>>> Thanks,
>>> Gilles
>>> 
>>> What
>>>> that means is that merging PRs from Github becomes one click in the
>>>> Github UI.
>>>> 
>>>> There are other consequences, of course, especially related to other
>>>> integrations Commons may be using (e.g. integration between Github
>>>> and
>>>> JIRA).
>>>> 
>>>> Of course, INFRA are the folks to talk to if this sounds interesting.
>>>> At Apache Jena, we looked into it but have taken no action because we
>>>> still have some open questions about when some of our workflow
>>>> integrations will become possible with "reversed mirroring".
>>>> 
>>>> Adam Soroka ; aj...@apache.org
>>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>> 
>> 
> 
> 
> -- 
> Matt Sicker <boa...@gmail.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to