My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2177: Previously-working commentlink no longer working in 2.7
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by memor...@gmail.com, Oct 9, 2013
Affected Version: 2.7

What steps will reproduce the problem?

1. Configure commentlinks as follows:

[commentlink "bugzillaold"]
        match = "[bB][Uu][Gg][Ss]?\\s*#?\\s*:?-?\\s*(\\d{4})"
        link = https://mycompanyurl.com/bugzilla/show_bug.cgi?id=$1
        enabled = true
[commentlink "bugzillanew"]
        match = "Bugzilla: *(\\d{4})"
        link = https://mycompanyurl.com/bugzilla/show_bug.cgi?id=$1
        enabled = true
[commentlink "gerritchangeid"]
        match = "(?:([a-zA-Z0-9/._-]+):)?(I[0-9a-f]{8,40})"
        link = "/#/q/change:$2+project:$1,n,z"
        enabled = true

There is no per-project commentlink config.


2. Upload a change with the following in the commit message:
---
Some subject text

Requires blah/some.project:I7ac750eb679470d9ad4d5f1f401623598125a30f
Requires blah/some.other-project:Ia44cd166176916d829eaeb82f6544f312dcb6205
Change-Id: I132f39e2b58bf82ecda21df42b31dd6843691125
Bugzilla: 7465
---


3. Go to the change page, e.g. http://mygerrit/#/c/64/

With our previous Gerrit release 2.6.1, all four of those footer lines were matched and output as commentlinks. (The "gerritchangeid" regex was matching the two "Requires" lines and the "Change-Id" line; the "bugzillanew" regex was matching the "Bugzilla:" line.)

With the 2.7 Gerrit release, the "Bugzilla: 7465" text is hyperlinked, but that's all. The "gerritchangeid" regex is no longer being matched. The only difference in config is adding the "enabled" lines. I've also tried without them. I've also tried the simpler regex from the documentation, and that doesn't work for me either:

[commentlink "gerritchangeid"]
        match = "(I[0-9a-f]{8,40})"
        link = "/#/q/change:$1,n,z"
        enabled = true

The regexes do appear to be sent to the page in JSON, but they are not matched, and the GWT javascript is too obfuscated for me to debug it.

Any suggestions?
Sign in to add a comment

Powered by Google Project Hosting