Hey, Github has a huge community of developers that collaborating with them can be beneficial for us and them but Wikimedia codes are in gerrit (and in future in phabricator) and our bug tracker is in phabrictor. sometimes It feels we are in another planet. Wikimedia has a mirror in github but we close pull requests immediately and we barely check issues raised there. Also there is a big notice in github[1], "if you want to help, do it our way". Suddenly I got an idea that if we can synchronize github activities with gerrit and phabricator, it would help us by letting others help in their own way. It made me so excited that I wrote a bot yesterday to automatically duplicates patches of pull requests in gerrit and makes a comment in the pull request stating we made a patch in gerrit. I did a test in pywikibot and it worked well [2][3].
Note that the bot doesn't create a pull request for every gerrit patch but it creates a gerrit patch for every (open) pull requests.
But before I go on we need to discuss on several important aspects of this idea: 1- Is it really necessary to do this? Do you agree we need something like that? 2-I think a bot to duplicate pull requests is not the best idea since it creates them under the bot account and not under original user account. We can create a plugin for phabrictor to do that but issues like privacy would bother us. (using OAuth wouldn't be a bad idea) What do you think? What do you suggest? 3- Even if we create a plugin, still a bot to synchronize comments and code reviews is needed. I wrote my original code in a way that I can expand this to do this job too, but do you agree we need to do this? 4- We can also expand this bot to create a phabricator task for each issue that has been created (except pull requests). Is it okay?
I published my code in [4].
[1]: https://github.com/wikimedia/pywikibot-core "Github mirror of "pywikibot/core" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing" [2]: https://github.com/wikimedia/pywikibot-core/pull/5 [3]: https://gerrit.wikimedia.org/r/208906 [4]: https://github.com/Ladsgroup/sync_github_bot
Best
It looks like a good idea. I haven't really looked in the source code but I'm wondering how the bot does certain things:
* A pull request can contain of multiple commits. Do you on every commit to the pull request squash them into one and push that up? (this might be gerrit specific; I actually don't know how it'll work on Phabricator) * What about comments? I think comments should appear on the respective other site (e.g. Legoktm commented in gerrit: that should show up in github (you might be able to associcate the users using the e-mail addresses)). Afaik it's possible to add comments to certain lines in github like in gerrit but as you need to squash that into one commit I don't think there is a sensible mapping. * Similar to comments: Maybe Jenkins' result should appear in the pull request. * And a small feature request would be that when the bot comments that it has been synced with gerrit, you should add the gerrit id.
And the comments are an important feature. Without showing the comments on the respective other site I don't think this is worthwhile as the author basically gets no feedback on their code.
Fabian
Quick general question: are you proposing this for pywikibot only? I think the answer is yes, just making sure.
<quote name="Amir Ladsgroup" date="2015-05-05" time="07:05:48 +0000">
Hey, Github has a huge community of developers that collaborating with them can be beneficial for us and them but Wikimedia codes are in gerrit (and in future in phabricator) and our bug tracker is in phabrictor. sometimes It feels we are in another planet. Wikimedia has a mirror in github but we close pull requests immediately and we barely check issues raised there. Also there is a big notice in github[1], "if you want to help, do it our way". Suddenly I got an idea that if we can synchronize github activities with gerrit and phabricator, it would help us by letting others help in their own way. It made me so excited that I wrote a bot yesterday to automatically duplicates patches of pull requests in gerrit and makes a comment in the pull request stating we made a patch in gerrit. I did a test in pywikibot and it worked well [2][3].
Note that the bot doesn't create a pull request for every gerrit patch but it creates a gerrit patch for every (open) pull requests.
But before I go on we need to discuss on several important aspects of this idea: 1- Is it really necessary to do this? Do you agree we need something like that? 2-I think a bot to duplicate pull requests is not the best idea since it creates them under the bot account and not under original user account. We can create a plugin for phabrictor to do that but issues like privacy would bother us. (using OAuth wouldn't be a bad idea) What do you think? What do you suggest? 3- Even if we create a plugin, still a bot to synchronize comments and code reviews is needed. I wrote my original code in a way that I can expand this to do this job too, but do you agree we need to do this? 4- We can also expand this bot to create a phabricator task for each issue that has been created (except pull requests). Is it okay?
I published my code in [4].
[1]: https://github.com/wikimedia/pywikibot-core "Github mirror of "pywikibot/core" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing" [2]: https://github.com/wikimedia/pywikibot-core/pull/5 [3]: https://gerrit.wikimedia.org/r/208906 [4]: https://github.com/Ladsgroup/sync_github_bot
Best
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
On Wed, May 6, 2015 at 12:13 AM Greg Grossmeier greg@wikimedia.org wrote:
Quick general question: are you proposing this for pywikibot only? I think the answer is yes, just making sure.
No, I'm proposing to do this in general. I never mentioned pywikibot as
the goal I just said I did a test in pywikibot and it worked well.
<quote name="Amir Ladsgroup" date="2015-05-05" time="07:05:48 +0000"> > Hey, > Github has a huge community of developers that collaborating with them can > be beneficial for us and them but Wikimedia codes are in gerrit (and in > future in phabricator) and our bug tracker is in phabrictor. sometimes It > feels we are in another planet. > Wikimedia has a mirror in github but we close pull requests immediately and > we barely check issues raised there. Also there is a big notice in > github[1], "if you want to help, do it our way". Suddenly I got an idea > that if we can synchronize github activities with gerrit and phabricator, > it would help us by letting others help in their own way. It made me so > excited that I wrote a bot yesterday to automatically duplicates patches of > pull requests in gerrit and makes a comment in the pull request stating we > made a patch in gerrit. I did a test in pywikibot and it worked well [2][3]. > > Note that the bot doesn't create a pull request for every gerrit patch but > it creates a gerrit patch for every (open) pull requests. > > But before I go on we need to discuss on several important aspects of this > idea: > 1- Is it really necessary to do this? Do you agree we need something like > that? > 2-I think a bot to duplicate pull requests is not the best idea since it > creates them under the bot account and not under original user account. We > can create a plugin for phabrictor to do that but issues like privacy would > bother us. (using OAuth wouldn't be a bad idea) What do you think? What do > you suggest? > 3- Even if we create a plugin, still a bot to synchronize comments and code > reviews is needed. I wrote my original code in a way that I can expand this > to do this job too, but do you agree we need to do this? > 4- We can also expand this bot to create a phabricator task for each issue > that has been created (except pull requests). Is it okay? > > I published my code in [4]. > > [1]: https://github.com/wikimedia/pywikibot-core "Github mirror of > "pywikibot/core" - our actual code is hosted with Gerrit (please see > https://www.mediawiki.org/wiki/Developer_access for contributing" > [2]: https://github.com/wikimedia/pywikibot-core/pull/5 > [3]: https://gerrit.wikimedia.org/r/208906 > [4]: https://github.com/Ladsgroup/sync_github_bot > > Best
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
-- | Greg Grossmeier GPG: B2FA 27B1 F7EB D327 6B8E | | identi.ca: @greg A18D 1138 8E47 FAC8 1C7D |
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
<quote name="Amir Ladsgroup" date="2015-05-05" time="19:46:05 +0000">
On Wed, May 6, 2015 at 12:13 AM Greg Grossmeier greg@wikimedia.org wrote:
Quick general question: are you proposing this for pywikibot only? I think the answer is yes, just making sure.
No, I'm proposing to do this in general. I never mentioned pywikibot as the goal I just said I did a test in pywikibot and it worked well.
OK, wasn't sure. Thanks for clarifying.
A few comments: 1) Remember that the plan of record is for all repos to migrate away from Gerrit (which we all hate) to Phab's Differential. The timing for that is probably next quarter (ie: work starting July 1st).
2) We tried this once before, specifically Yuvi, with his SuchABot. He'll probably reply here with his bot's code and examples from when it was running.
2b) I'm not sure the work will be worth the pay-off. We've seen the arguments before and when we did have SuchABot running there weren't, from what I heard, a ton of success stories. I know it's tempting to say "but Github is where all developers are" but that's not entirely true for, especially, our community of developers who primarily come from the Wikipedia/MediaWiki communities (generally defined). Now, I realize I'm going off of anecdotal data here, but I haven't seen much other anecdotal data that seems to suggest otherwise (other than gut feelings).
3) The repository of record will continue to be Gerrit until we migrate to Differential (in Phabricator).
Greg
pywikipedia-l@lists.wikimedia.org