Page MenuHomePhabricator

Develop a newcomer bot for Gerrit
Closed, ResolvedPublic

Assigned To
Authored By
srishakatux
Apr 12 2018, 1:50 AM
Tokens
"Like" token, awarded by Volker_E."Love" token, awarded by xSavitar."Love" token, awarded by Chicocvenancio."Love" token, awarded by ssastry."Like" token, awarded by Jdforrester-WMF."Orange Medal" token, awarded by Krinkle."Yellow Medal" token, awarded by Tgr.

Description

As per conclusion in T188244#4089807, the goal of this task is to create a Gerrit newcomer bot that does two things:

  • Add a reviewer ("first-time-contributor") to a patch submitted by a first time contributor and upload a welcome message in a comment
  • Add contributors who have started contributing in the last three months with five patches open still to a group called "Newcomers."

That way this bot would help us in two ways: a) provides a solution to welcome newcomers to Gerrit and b) a process to query newcomer patches

Work in progress

See also

Event Timeline

srishakatux created this task.

How is this task different at all from T73357?

Update: the bot is now on Toolforge: https://tools.wmflabs.org/admin/tool/gerrit-newcomer-bot. The changes are currently applied to Gerrit's test instance: http://gerrit.git.wmflabs.org. An example of the changes in effect (via the running bot): https://gerrit.git.wmflabs.org/r/#/c/202/.

Update: the bot is now on Toolforge: https://tools.wmflabs.org/admin/tool/gerrit-newcomer-bot. The changes are currently applied to Gerrit's test instance: http://gerrit.git.wmflabs.org. An example of the changes in effect (via the running bot): https://gerrit.git.wmflabs.org/r/#/c/202/.

Pretty cool! I have a suggestion - Maybe don't hardcode the message shown to the user in the bot code but have it pick it up from a mediawiki page, so it's easy to modify when needed, which I think will be frequent. So like, create a page such as this where the bot message goes and the bot makes an API call to get that text every time it makes a post (not too frequent, I think).
This will allow you to experiment with different messages more easily to see which ones are more effective without having to make a patch every time.

@Niharika Thanks, good suggestion! I've filed an issue on the repo and will look into it.

Is @srishakatux an admin on mw.org? We want it to be a protected page to avoid vandalism....

I don't think a commit is that big of a deal to change the message--which I don't actually think will be tweaked all that much.

(Remember, we abstracted it to the config file and out of the code itself)

hello. seems this bot is working in gerrit and it has written same message twice in same change page. seems it writes after every patch set upload.

@qdinar thanks for reporting! I noticed your patchset and filed an issue here. Will add a fix soon!