Page MenuHomePhabricator

GitLab comments should come from a CodeReviewBot instead of gerritbot
Closed, ResolvedPublic

Description

Per @hashar here: T325297#8474351

Event Timeline

brennen changed the task status from Open to In Progress.Mar 1 2023, 6:45 PM
brennen claimed this task.

Per discussion on this pull request to Phabricator-maintenance-bot for patch-for-review tagging, I'm going to create a CodeReviewBot in Phab and switch to using that for GitLab MR notices.

I've found these docs:

I'll create a bot request subtask here, just for transparency, but should be able to create the bot myself.

brennen renamed this task from GitLab comments should come from a GitLabBot instead of gerritbot to GitLab comments should come from a CodeReviewBot instead of gerritbot.Mar 1 2023, 6:46 PM
brennen triaged this task as Medium priority.
brennen updated the task description. (Show Details)

I confirmed the new CodeReviewBot user works here - T324164#8664674 - but haven't permanently switched to that yet since I need to make sure it works with Phabricator maintenance bot.

Additionally, I think maybe the maintenance bot should do just do everything as CodeReviewBot instead of gerritbot, so it's not tied to to the name of a specific service - but I'm not sure if that would break any existing workflows or matching on the name elsewhere.

brennen changed the task status from In Progress to Stalled.Mar 21 2023, 5:08 PM
brennen added a project: User-brennen.
brennen moved this task from Backlog to Doing on the User-brennen board.
brennen added a subscriber: Ladsgroup.

cc: @Ladsgroup who I believe was taking time off back when I started looking at this.

Hi,
it's quite easy to make my bot work with both gerrit bot and code reviewbot. At least during the migration period. Simply change the line in here:

if transaction['authorPHID'] == self.gerrit_bot_phid:

To something like:

if transaction['authorPHID'] in [self.gerrit_bot_phid, self.code_review_bot_phid]:

(and set that attribute somewhere). And be done with it. Feel free to make a PR. If you don't want to, I can make it as well.

Feel free to make a PR.

Will do, thanks!

brennen changed the task status from Stalled to In Progress.May 8 2023, 11:13 PM
brennen moved this task from Doing to Needs/Waiting Review on the User-brennen board.

Mentioned in SAL (#wikimedia-releng) [2023-05-10T23:19:39Z] <brennen> reconfigured and restarted gitlab-webhooks to use CodeReviewBot for messages instead of gerritbot (T327424)

Thank you @brennen and @Ladsgroup , that will slightly reduce the confusion of people filing task against Gerrit instead of GitLab or whatever else :)