Page MenuHomePhabricator

Report GitLab merge request events to IRC
Open, Needs TriagePublicFeature

Description

Report on merge request events received from https://wikitech.wikimedia.org/wiki/GitLab/Webhooks.

These events are similar to the events seen by wikibugs from Gerrit. A non-trivial difference is that comments made on merge requests are not reported by this system. They are instead sent comment events and are not available at the system hooks level handled by our integration.

Event Timeline

Quick mockup using jq of data likely to be used in building messages:

$ grep '"object_kind": "merge_request"' events.log | grep "bd808" | jq '{"action": .object_attributes.action, "user": .user.username, "message": .object_attributes.title, "repo": .object_attributes.target.path_with_namespace, "branch": .object_attributes.target_branch, "url": .object_attributes.url, "owner": .object_attributes.author_id, "state": .object_attributes.state }'
{
  "action": "open",
  "user": "bd808",
  "message": "Relicense under GPL-3.0-or-later",
  "repo": "toolforge-repos/wikibugs2",
  "branch": "main",
  "url": "https://gitlab.wikimedia.org/toolforge-repos/wikibugs2/-/merge_request
s/22",
  "owner": 14,
  "state": "opened"
}
{
  "action": "approved",
  "user": "bd808",
  "message": "Relicense under GPL-3.0-or-later",
  "repo": "toolforge-repos/wikibugs2",
  "branch": "main",
  "url": "https://gitlab.wikimedia.org/toolforge-repos/wikibugs2/-/merge_requests/22",
  "owner": 14,
  "state": "opened"
}
{
  "action": "merge",
  "user": "bd808",
  "message": "Relicense under GPL-3.0-or-later",
  "repo": "toolforge-repos/wikibugs2",
  "branch": "main",
  "url": "https://gitlab.wikimedia.org/toolforge-repos/wikibugs2/-/merge_requests/22",
  "owner": 14,
  "state": "merged"
}