Last modified: 2013-06-28 19:52:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37876, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35876 - Labslogbot should auto-link git hashes and Gerrit change-ids
Labslogbot should auto-link git hashes and Gerrit change-ids
Status: NEW
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-11 06:27 UTC by Raimond Spekking
Modified: 2013-06-28 19:52 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2012-04-11 06:27:59 UTC
Now that deployment is doing from Git/Gerrit please modify Logmsgbot/Morebots in a way that entries in the Server admin log with a reference to Gerrit like 'g4102' (see http://wikitech.wikimedia.org/index.php?title=Server_admin_log&action=historysubmit&diff=45476&oldid=45473 ) are linked to Gerrit.
Comment 1 Andre Klapper 2012-11-17 15:34:36 UTC
Using {{gerrit|1234}} markup works, see http://wikitech.wikimedia.org/index.php?title=Server_admin_log&diff=53199&oldid=53198 .
Not sure how common g1234 format is, at least I couldn't find a recent entry with this.
Comment 2 Krinkle 2013-05-04 03:07:25 UTC
It should link Git hashes and gerrit change-id hashes, those are recommended form for identifiers of changes. During deployment a git hash is most precise (not ambiguous between different branches and usable in Git outside Gerrit context).

Regexes for these can be found in the Gerrit configuration and Bugzilla configuration, which already have these.

Should probably be added to the syntax morebots already has for expanding "bug 123" to {{bug|123}} which displays [[bugzilla:123|bug 123]].

I updated the {{Gerrit}} template on wikitech to also take git hashes and gerrit change-ids, so it should be easier to expand for more bots.

It only has to expand the matched hashes to {{Gerrit|<match>}}.
Comment 3 Gerrit Notification Bot 2013-06-12 04:33:01 UTC
Related URL: https://gerrit.wikimedia.org/r/68135 (Gerrit Change I0a7ca5450f9f74ebd36fb47f8e30d2fc8135df97)
Comment 4 Ori Livneh 2013-06-28 19:52:29 UTC
Current status: 68135 was deployed, but I was dumb and screwed up the regexp. (It matches '2013', for example.)

I worked around some of the bugs in https://wikitech.wikimedia.org/wiki/Module:Gerrit, but I should fix the regexp.

I wonder if perhaps we should avoid doing *any* special processing of the message content in adminbot and instead just wrap the entire message in a template or module invocation, like:

   {{SAL|17:33 mutante: upgrading binutils and libldap on bast1001}}

That way we do all the fancy string processing in Lua. We'd be able to tweak it / enhance it without relying on rebuilding the adminbot package.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links