Page MenuHomePhabricator

Add a welcome bot to Gerrit for first time contributors
Closed, DuplicatePublic

Description

Something akin to https://review.openstack.org/#/c/124398/ - The "Welcome, new contributor!" message is quite a nice touch


See Also: T64324: Visually indicate when a Phabricator user is new (Welcome culture)

Details

Reference
bz71357

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:43 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz71357.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Sep 26 2014, 2:19 PM
Reedy added a comment.Sep 26 2014, 2:24 PM

It would seem they are using https://github.com/openstack-infra/jeepyb/blob/master/jeepyb/cmd/welcome_message.py

Seems pretty stupid IMHO to code something up ourselves :). Maybe refactor the upstream version a bit to be more reuseable (not hardcoding the text in the py file etc)

demon removed a subscriber: demon.Dec 8 2014, 6:25 PM
hashar triaged this task as Low priority.Sep 10 2015, 9:26 AM
hashar updated the task description. (Show Details)
hashar added a project: Developer-Advocacy.
hashar set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 10 2015, 9:26 AM
Qgil added a comment.Sep 13 2015, 1:20 PM

Would there be any equivalent to this in Phabricator/Differential?

Would there be any equivalent to this in Phabricator/Differential?

No idea, but we should probably do something similar, might not be worth bothering for Gerrit now, though, it shouldn't be too much work to do it for gerrit, just fork the script, modify for our usage...

Would there be any equivalent to this in Phabricator/Differential?

I'd really love to know this too.
Anyone having a vague technical idea how hard adding such an automated message would be in a Differential world? @mmodell or so? :)

OpenStack's welcoming message is great. It sets correct expectations on speed of patch review and how to escalate if review does not happen.

(I'd also like to think about a "Congratulations! Your first patch has been merged! Would you fancy working on a second task? Check out https://mediawiki.org/wiki/Annoying_little_bugs" message or something like that.)

QChris removed a subscriber: QChris.Jan 24 2016, 9:32 PM
greg renamed this task from Add OpenStack esk welcomer bot to Gerrit to Add a welcome bot to Gerrit for first time contributors.May 12 2016, 10:41 PM
greg lowered the priority of this task from Low to Lowest.
greg removed a project: Differential.
greg removed a subscriber: wikibugs-l-list.
greg added a subscriber: greg.May 12 2016, 10:44 PM

(made two separate tasks, one for Gerrit and one for Differential, to keep things tidy...)

Currently that would be the page, yes. (Once T134256 and T129068 are fixed that page might become a redirect.)

In the context of T137214 I digged a bit because I'd still like to see this happen.

Can someone judge whether the python module dependencies could be fulfilled in our setup and if there would be other technical blockers?

We will need python installed on the gerrit server including a repo created for this so we can make modifications.

mmodell added a subscriber: demon.Aug 26 2016, 4:06 PM

Technical feasibility: Seems pretty straightforward.

I don't see anything blocking us from implementing something like this, although it uses paramiko to submit the comments via ssh to gerrit, which seems a rather odd way to do it. I would think that a rest api request would make more sense. That really shouldn't block us from implementing this, however, maybe @demon has a more informed opinion?

Non-technical opinion: I like the idea, it seems like a Good Thing™ to encourage new contributors in this way.

I especially liked this sentiment:

The more you participate in the community the more rewarding it is for you. You may also notice that the more you get to know people and get to be known, the faster your patches will be reviewed and eventually approved. Get to know others and become known by doing code reviews: anybody can do it, and it's a great way to learn the code base.

@demon: Any technical input?

Can someone judge whether the python module dependencies could be fulfilled in our setup and if there would be other technical blockers?

I suspect it would be easier for us to write this as a script that runs on labs and uses a similar set up to forrestbot using emails.

I recently submitted my first patch to OpenStack and enjoyed the welcome message. If someone drafts up message text, I'd be happy to do the technical implementation.

Thanks @Legoktm!

The text used by OpenStack is pretty friendly, explaining, and great.
I have problems to rephrase it to not be plagiarism (and I don't see us either adding a "Text by ..." at the bottom of each message here). Hmmmm.

Slightly modified version that's still plagiarism:

<<<
Thank you for your first contribution to Wikimedia's code repositories!

Your patch will be tested automatically by our testing framework. Once the automatic tests pass, your patch will be reviewed by other developers and they will provide feedback. It is rare that people get their patch approved on the first try, so don't be concerned by requests to make corrections. Feel free to modify your patch and resubmit a new changeset.

Three out of four patches in Gerrit get reviewed with 2 days. Please be patient and available to answer questions and go through your work. The more you participate in the community the more rewarding it is for you. You may also notice that the more you get to know people and get to be known, the faster your patches will be reviewed and eventually approved. Get to know others and become known by doing code reviews: anybody can do it, and it's a great way to learn about the code base.

Thanks again for supporting Wikimedia! We look forward to working with you. Let us know if you need any help!

Resubmitting a changeset: https://www.mediawiki.org/wiki/Gerrit/Tutorial#Amending_a_change_.28your_own_or_someone_else.27s.29
Getting help: https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker
Performing Code Reviews: https://www.mediawiki.org/wiki/Gerrit/Code_review
Writing Commit Messages: https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines
<<<

greg added a comment.Sep 12 2016, 5:30 PM

Pretty sure it's under a free license, so as long as we attribute correctly in our source you don't need to worry about plagiarism :)

Reedy added a comment.Sep 12 2016, 5:34 PM

Pretty sure it's under a free license, so as long as we attribute correctly in our source you don't need to worry about plagiarism :)

I was gonna say the same thing

https://github.com/openstack-infra/jeepyb/blob/master/jeepyb/cmd/welcome_message.py#L3-L5

Apache License, Version 2.0

Ah, great! Thanks for getting another issue (license) out of the way. :)

Does the text in T73357#2629661 look okay? Any changes?
Or have we already arrived at the "someone needs to write some code" stage?

(For those interested, "Three out of four patches in Gerrit get reviewed with 2 days" in the proposed text is my interpretation of data on https://wikimedia.biterg.io/ and I'm happy to provide a patch in the future to update that statement if needed.)

Aklapper assigned this task to Legoktm.Sep 26 2016, 12:03 PM

If someone drafts up message text, I'd be happy to do the technical implementation.

See above. :)

@Legoktm: I'll boldly assign this to you. (Thanks again for offering help here!)
If there's anything I can help with, please do let me know!

Maybe we should also encourage new submissions to attend the 'code review office hours' on IRC

This proposal is selected for the developer wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) summarizing the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

demon added a comment.Feb 3 2017, 11:32 PM

@demon: Any technical input?

Yes!

I don't see anything blocking us from implementing something like this, although it uses paramiko to submit the comments via ssh to gerrit, which seems a rather odd way to do it. I would think that a rest api request would make more sense. That really shouldn't block us from implementing this, however, maybe @demon has a more informed opinion?

Yes, please use the rest API (docs). The SSH interface isn't an API, and has been known to change in breaking ways (cf: zuul not being able to post comments after upgrades in the past)

Small thought. Remember the discussion we had at the devsummit regarding human interaction... with regard to easy tasks @QuimGil and @Aklapper ?

How about we also have a bot that picks a more experienced contributor from the recents patches, and send THAT person a message to welcome the new user ? A human welcome might be a lot more productive than just the bot welcome.

Qgil removed a subscriber: QuimGil.Mar 13 2017, 5:26 PM

Can we have both? A bot welcome to everybody as soon as they show up plus a human welcome if/when an assigned human volunteers for it. Humans are no reliable {{citation not really needed}} and an automated message would still be better than no message or a very late one.

Uhm, thanks Tgr! That's research I was unaware of when I edited the mw.org welcome template a year ago...

That tool will not work with newer releases of gerrit as the db is going away and is deprecated from version 2.14+. And also this tool breaks with 2.14+ as the accounts are being migrated to a refs/meta/* ref. Not all is migrated.

I think we should create a gerrit plugin.

It's now easy to deploy and i can help chad maintain it if the plugin is developed :).

Potentially superseded by T192046 ?

That's a dupe of this....

hashar added subscribers: MZMcBride, Nemo_bis.
hashar added a subscriber: hashar.

sorry I messed it up :( Feel free to keep this or the other task