Page MenuHomePhabricator

wikibugs2 should not post on IRC for Gerrit changes marked 'WIP'
Closed, ResolvedPublic

Event Timeline

jerkins is out to cause people misery

hashar subscribed.

The notifications are emitted by Wikibugs https://gerrit.wikimedia.org/r/plugins/gitiles/labs/tools/wikibugs2/

One would need to find out what kind of metadata is used to flag an event as being done against a WIP change. I am guessing there is wip: true ? That can be checked by looking at gerrit stream-events.

Aklapper added a subscriber: thcipriani.

@thcipriani: A good first task is a self-contained, non-controversial task with a clear approach and links to documentation and the codebase (see the project description). Given the current task description I'm removing the good first task tag.

dancy renamed this task from jerkins-bot should not post on IRC for Gerrit changes marked 'WIP' to wikibugs2 should not post on IRC for Gerrit changes marked 'WIP'.Jul 3 2020, 7:07 PM

Verified that the change key of a gerrit event has "wip": true for changes marked WIP.
For example:

"change": {
  "project": "test/gerrit-ping",
  "branch": "master",
  "id": "Ida86cf0127a0086aecadd122d38f1aae342f5135",
  "number": 609484,
  "subject": "Testing WIP behavior",
  "owner": {
    "name": "Ahmon Dancy",
    "email": "adancy@wikimedia.org",
    "username": "dancy"
  },
  "url": "https://gerrit.wikimedia.org/r/c/test/gerrit-ping/+/609484",
  "commitMessage": "Testing WIP behavior\n\nChange-Id: Ida86cf0127a0086aecadd122d38f1aae342f5135\n",
  "createdOn": 1593801842,
  "status": "NEW",
  "wip": true
},

Change 609488 had a related patch set uploaded (by Ahmon Dancy; owner: Ahmon Dancy):
[labs/tools/wikibugs2@master] Ignore events for changes marked WIP

https://gerrit.wikimedia.org/r/609488

T175929 has some discussion on this topic. Looks like an attempt was made to achieve the goal via https://gerrit.wikimedia.org/r/c/labs/tools/wikibugs2/+/491868 but it was not merged. My commit https://gerrit.wikimedia.org/r/609488 does more or less the same thing (but with fewer touched lines of code). Still need to add tests.

Test added. Ready for review.

Change 609488 merged by jenkins-bot:
[labs/tools/wikibugs2@master] Ignore events for changes marked WIP

https://gerrit.wikimedia.org/r/609488