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 raised the priority of this task from to Medium.
Qgil updated the task description. (Show Details)
Qgil changed Security from none to None.
Qgil added subscribers: Qgil, Anomie, Aklapper and 3 others.

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

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 Medium 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 raised the priority of this task from Low to Medium.Oct 29 2014, 9:21 PM
Qgil edited projects, added Phabricator; removed Bugzilla-Preview, Bugzilla-Migration.

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 Medium to Low.Nov 7 2014, 10:49 AM

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

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: You're of course right, thank you! Could you adjust the table in the task summary here?

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.

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

chasemp lowered the priority of this task from Low to Lowest.