Preface: I am new to Gerrit (but not Git), so go easy on me :)
I have a situation where I have a set of git repos (about 20) which
have a canonical location in Gerrit, but which are also mirrored to
Github.
All development happens in Gerrit and stuff is synced to Github weekly
or monthly.
As it turns out, there are a huge number of forks and pull requests on
Github that currently need to manually be migrated over via patches
(icky).
So my question is: Is anybody automatically syncing (via a bot or
cron) Github pull requests to Gerrit by making appropriate patchsets
for them?
Does Gerrit expose a web API where I can create new patchsets via code?
Thanks for any and all help!
Duke
--
Jonathan "Duke" Leto <jona...@leto.net>
209.691.DUKE // http://leto.net
NOTE: Personal email is only checked twice a day at 10am/2pm PST,
please call/text for time-sensitive matters.
Not that I know of, but a way to import GitHub pull requests as Gerrit
changes would be very cool.
> So my question is: Is anybody automatically syncing (via a bot or
> cron) Github pull requests to Gerrit by making appropriate patchsets
> for them?
>
> Does Gerrit expose a web API where I can create new patchsets via code?
Web API? This is Git. We don't have web APIs. :-)
Patches can only be created by a Git push, either over SSH or HTTP...
but it has to be a send-pack/receive-pack stream going into the
git-receive-pack "command" or URL handler in the Gerrit server to
create new changes or attach patch sets to existing changes.
On Fri, Jan 27, 2012 at 12:52, Jonathan "Duke" Leto <jal...@gmail.com> wrote:
> Preface: I am new to Gerrit (but not Git), so go easy on me :)
>
> I have a situation where I have a set of git repos (about 20) which
> have a canonical location in Gerrit, but which are also mirrored to
> Github.
>
> All development happens in Gerrit and stuff is synced to Github weekly
> or monthly.
>
> As it turns out, there are a huge number of forks and pull requests on
> Github that currently need to manually be migrated over via patches
> (icky).Not that I know of, but a way to import GitHub pull requests as Gerrit
changes would be very cool.
> So my question is: Is anybody automatically syncing (via a bot or
> cron) Github pull requests to Gerrit by making appropriate patchsets
> for them?
>
> Does Gerrit expose a web API where I can create new patchsets via code?Web API? This is Git. We don't have web APIs. :-)
Patches can only be created by a Git push, either over SSH or HTTP...
but it has to be a send-pack/receive-pack stream going into the
git-receive-pack "command" or URL handler in the Gerrit server to
create new changes or attach patch sets to existing changes.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
It is unclear for me however how to track the status synch in case b. ... any idea ?
GitHub plugin is getting closer, the following parts have been completed:a) OAuth sign-in (either as primary Gerrit authentication OR as additional sign-in on the GitHub plugin)b) Auto-create Gerrit projects and securityc) Clone and configure replication from Gerrit to GitHubThe plugin does not include CSS branding, *BUT* the UX is designed for being branded and shaped as desired.I am tackling now the PULL request part, in theory the most complicated but in reality NOT: once you have set-up the GitHub authentication infrastructure and replication, it is really straightforward afterwards :-)I would like to make it both interactive *AND* batch.1. Interactive: you see the list of pull requests pending and you can select the ones to import and the strategy (1 pull request = 1 change; 1 pull request = N dependant changes)
2. Batch: a new GitHub replication plugin, branched from the current replication in Gerrit, to automatically work in "pull mode" with GitHub. Current replication plugin works *ONLY* in push mode and that wouldn't work with GitHub (changes can be made on GitHub as pull requests: you need to poll and pull rather than just pushing)Any suggestions, ideas on the above ?We should be around 1-2 weeks away from the FULL plugin to be released then :-)(for the joy of the WikiMedia folks ;-) )
On Wednesday, September 18, 2013 11:13:51 AM UTC+2, lucamilanesio wrote:GitHub plugin is getting closer, the following parts have been completed:a) OAuth sign-in (either as primary Gerrit authentication OR as additional sign-in on the GitHub plugin)b) Auto-create Gerrit projects and securityc) Clone and configure replication from Gerrit to GitHubThe plugin does not include CSS branding, *BUT* the UX is designed for being branded and shaped as desired.I am tackling now the PULL request part, in theory the most complicated but in reality NOT: once you have set-up the GitHub authentication infrastructure and replication, it is really straightforward afterwards :-)I would like to make it both interactive *AND* batch.1. Interactive: you see the list of pull requests pending and you can select the ones to import and the strategy (1 pull request = 1 change; 1 pull request = N dependant changes)So what would happen if you chose the 1PR=1change strategy upon merging? I suppose you'd end up with one commit in in the repo corresponding with the change and the PR is closed, but would it also be updated (force-push) and thus could have the "merged" badge (rather than just being "closed"); or would a comment be instead posted with the SHA1 of the merged commit? (or merge commit? depending on Gerrit's merge strategy)
2. Batch: a new GitHub replication plugin, branched from the current replication in Gerrit, to automatically work in "pull mode" with GitHub. Current replication plugin works *ONLY* in push mode and that wouldn't work with GitHub (changes can be made on GitHub as pull requests: you need to poll and pull rather than just pushing)Any suggestions, ideas on the above ?We should be around 1-2 weeks away from the FULL plugin to be released then :-)(for the joy of the WikiMedia folks ;-) )
I'm looking forward to seeing it in action :)
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.