Last modified: 2012-11-07 09:26:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 35144 - Autolink to new Gerrit / Git changesets and SHA-1 commits
Autolink to new Gerrit / Git changesets and SHA-1 commits
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Bugzilla (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 35381 41321
Blocks: 22596
  Show dependency treegraph
 
Reported: 2012-03-11 02:59 UTC by Sumana Harihareswara
Modified: 2012-11-07 09:26 UTC (History)
12 users (show)

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


Attachments

Description Sumana Harihareswara 2012-03-11 02:59:49 UTC
People will need to refer, in Bugzilla comments, to changeset "Change ID"s (SHA-1s) and to the changeset numbers in the Gerrit changeset URL for any given diff.  So:

* Convert the Bugzilla code to recognize the new SHA-1 commits
* Come up with a shorthand to autolink from BZ to gerrit changeset
Comment 1 Sam Reed (reedy) 2012-03-11 03:25:14 UTC
Doing this should be reasonably trivial... Weve got to decide on the syntax for identifying it. In the simplest form a sha1 has is only really distinguishable from words byit having numbers in it. Even tjen on shorthand it may be letters, which could in theory bea word
Comment 2 Rob Lanphier (RobLa) 2012-03-11 04:31:13 UTC
The Gerrit UI seems to prefix Git ids with a capital "I", even offering a button for copying the full SHA-1 hash to the clipboard prefixed with the "I".  It's not what I would have chosen, but I wonder if Gerrit is following some convention established elsewhere.  Worth looking into, and may be a good default barring a better suggestion.

For Gerrit links, since we're not 100% convinced we want to stay with Gerrit for very long, it may be best to use something like "Gerrit change #12345" or "gerrit:12345" that will be relatively easy to search for in the distant future should we switch away from Gerrit in the near future.
Comment 3 Sumana Harihareswara 2012-03-15 00:15:16 UTC
Not a blocker for the March 21st migration.
Comment 5 Antoine "hashar" Musso (WMF) 2012-03-21 13:22:15 UTC
change #####
change 1234
Comment 6 Chad H. 2012-03-26 23:35:34 UTC
What other syntaxes do we want here?
Comment 7 Antoine "hashar" Musso (WMF) 2012-03-27 06:04:31 UTC
Giving the rendering of comment 4 (all six lines are rendered as the same HTML), it is hard to tell which syntax are supported.
Comment 9 Mark A. Hershberger 2012-03-28 19:23:42 UTC
(In reply to comment #7)
> Giving the rendering of comment 4 (all six lines are rendered as the same
> HTML), it is hard to tell which syntax are supported.

Would it be possible to leave the original text so that we can see what works?
Comment 10 Chad H. 2012-03-29 03:09:13 UTC
(In reply to comment #9)
> (In reply to comment #7)
> > Giving the rendering of comment 4 (all six lines are rendered as the same
> > HTML), it is hard to tell which syntax are supported.
> 
> Would it be possible to leave the original text so that we can see what works?

I posted a link to the regex above, but here it is:

gerrit(\ change(set)?)?\ ?\#?(\d+)
Comment 11 Mark A. Hershberger 2012-03-29 15:21:26 UTC
(In reply to comment #10)
> I posted a link to the regex above, but here it is:

I understood your link to the regex, but what I was asking is if we
made a link like "gerrit #1" to remain as is (i.e. no “change”)
instead of all of the links being displayed the same way. (I'm
assuming I understand what is going on and that the links will be
parsed and displayed a certain way.)
Comment 12 Nemo 2012-03-30 19:47:07 UTC
It would also be nice to have a shortened syntax, as we used to have r100000, unless we now think that it's very evil and confusing (maybe it is).
I don't know what letter(s) to use, maybe g for gerrit or c for change(set)? g4020, c4020. 
(I suppose it would be better to imitate what other git users do out there.)

P.s.: I've added the syntax to https://www.mediawiki.org/wiki/Bugzilla#What_syntax_can_I_use.3F
Comment 13 Daniel Zahn 2012-04-03 16:22:25 UTC
Gerrit change #1234
Gerrit change #1234 patchset 2

:p
Comment 14 Liangent 2012-05-30 13:34:34 UTC
Change-Id: Ifdc79e9c5d95f978025b237a5eeb95fd75092f46
Comment 15 Liangent 2012-05-30 13:35:05 UTC
gerrit Ifdc79e9c5d95f978025b237a5eeb95fd75092f46
Comment 16 Liangent 2012-05-30 13:35:36 UTC
Can we make above text autolinked?
Comment 17 Thehelpfulone 2012-06-22 19:18:24 UTC
Resetting to default per bug 37789
Comment 18 MZMcBride 2012-07-05 04:47:19 UTC
It looks like auto-linking by SHA1 was done by Krinkle in r115448. Is this correct? If so, what needs to happen to push this change live?
Comment 19 Nemo 2012-11-05 09:11:59 UTC
(In reply to comment #18)
> It looks like auto-linking by SHA1 was done by Krinkle in r115448. Is this
> correct? If so, what needs to happen to push this change live?

I think it's live now?
Some people are using c12345 as a shortcut to the (boring) Gerrit change #12345, maybe that could be the new r12345?
Comment 20 Nemo 2012-11-05 09:13:03 UTC
Note that "Gerrit change #12345" in the previous comment is currently not autolinking, maybe for newlines?
Comment 21 Hydriz Scholz 2012-11-05 09:16:36 UTC
Does Gerrit change #12345 work? (it should)
Comment 22 Ori Livneh 2012-11-07 09:26:49 UTC
Closing, as this appears to have been implemented. There is a separate bug (Bug 40344) about the URL mangling which appears to affect some auto-links.

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


Navigation
Links