Page MenuHomePhabricator

Convert Gerrit links in Bugzilla comments in links in Phabricator tasks
Open, LowestPublic

Description

There are different ways to generate links to Gerrit in Bugzilla comments. Ideally those links should be kept in Phabricator comments.

See https://bugzilla.wikimedia.org/show_bug.cgi?id=72485

Potentially incomplete table. See https://git.wikimedia.org/blob/wikimedia%2Fbugzilla%2Fmodifications.git/HEAD/extensions%2FWikimedia%2FExtension.pm#L47 and https://git.wikimedia.org/blob/wikimedia%2Fbugzilla%2Fmodifications.git/HEAD/extensions%2FWikimedia%2FExtension.pm#L100

string in commentto become
Iec4f32fdefde15b2330dbb191fb3bbb0d04803e2Iec4f32fdefde15b2330dbb191fb3bbb0d04803e2 ([[ https://gerrit.wikimedia.org/r/#/q/Iec4f32fdefde15b2330dbb191fb3bbb0d04803e2,n,z | Iec4f32fdefde15b2330dbb191fb3bbb0d04803e2]] )capital I followed by 8 to 40 hexadecimal digits
71ccd1267c2407fc3fea1210c5f442edb7f6d9c371ccd1267c2407fc3fea1210c5f442edb7f6d9c3 ([[ https://gerrit.wikimedia.org/r/#/q/71ccd1267c2407fc3fea1210c5f442edb7f6d9c3,n,z | 71ccd1267c2407fc3fea1210c5f442edb7f6d9c3]] )between 8 and 40 hexadecimal digits
[Gg]errit [Cc]hange 10[Gg]errit [Cc]hange 10 ([[ https://gerrit.wikimedia.org/r/10 | Gerrit]] )at least two digits
[Gg]errit [Cc]hange #10[Gg]errit [Cc]hange #10 ([[ https://gerrit.wikimedia.org/r/10 | Gerrit]] )
[Gg]errit [Cc]hangeset 10[Gg]errit [Cc]hangeset 10 ([[ https://gerrit.wikimedia.org/r/10 | Gerrit]] )
[Gg]errit [Cc]hangeset #10[Gg]errit [Cc]hangeset #10 ([[ https://gerrit.wikimedia.org/r/10 | Gerrit]] )

Event Timeline

Qgil created this task.Oct 24 2014, 10:33 PM
Qgil updated the task description. (Show Details)
Qgil raised the priority of this task from to Normal.
Qgil changed Security from none to None.
Qgil added subscribers: Qgil, Anomie, Aklapper and 3 others.
Qgil added a comment.Oct 24 2014, 10:48 PM

Gerrit Notification Bot posts plain URLs to announce new patches. Isn't this the most used type of link to Gerrit? Idf this is true, then the priority for this task would be lower.

See for instance https://bugzillapreview.wmflabs.org/T3247#31141

Qgil moved this task from Backlog to Ready To Go on the Bugzilla-Preview board.Oct 26 2014, 6:09 AM

It is probably the most used type by now. For the records, we introduced the Gerrit Notification Bot in Bugzilla on 2013-07-23. This is legacy stuff in the same way as some folks still expect r12345 to link to Special:CodeReview. :)

Qgil lowered the priority of this task from Normal to Low.Oct 27 2014, 5:01 PM

Ah, I wasn't aware of this important detail. If most links to gerrit changes are already now http links, then I think we can lower the priority of this task.

Qgil moved this task from Ready To Go to Backlog on the Bugzilla-Preview board.Oct 28 2014, 11:15 AM
Qgil raised the priority of this task from Low to Normal.

This task is not essential, it has a risk of overcomplicating the migration process, and it can be done afterward either with direct changes to the database or a bot.

Qgil lowered the priority of this task from Normal to Low.Nov 7 2014, 10:49 AM
XZise added a subscriber: XZise.Nov 28 2014, 11:15 AM

Just for your information: gerrit id's are not linked yet like in T73817#768186.

jayvdb added a subscriber: jayvdb.Nov 29 2014, 4:41 PM
chasemp claimed this task.Dec 30 2014, 7:43 PM
Aklapper updated the task description. (Show Details)Dec 31 2014, 5:39 PM
XZise added a comment.Jan 1 2015, 3:10 AM

Are you sure that a hash without an I is linked as a change-id and not git hash? It looks in https://git.wikimedia.org/blob/wikimedia%2Fbugzilla%2Fmodifications.git/HEAD/extensions%2FWikimedia%2FExtension.pm#L63 like that it should be a git hash.

XZise updated the task description. (Show Details)Jan 1 2015, 3:12 AM

XZise: You're of course right, thank you! Could you adjust the table in the task summary here?

XZise added a comment.Jan 2 2015, 3:35 PM

I kind of already did?! it still links to gerrit but just without the I-prefix so in theory another commit. I could however use the git commit which is actually associated with the change id.

XZise updated the task description. (Show Details)Jan 2 2015, 3:36 PM

Ah, sorry. I missed the "edited the task description" here. Thanks!

chasemp lowered the priority of this task from Low to Lowest.Jan 30 2015, 8:00 PM
chasemp removed chasemp as the assignee of this task.