Community
Participate
Working Groups
Hi, a change like [1] triggers the very helpful Genie (thanks for the feature!), but a change like [2] did not; I had to add the See Also field myself in Bugzilla. From my observations I assume that Genie is not triggered by commit headers of the form Bug: xxxxxx even though they are shown as links in Gerrit. Is this correct? And can the behavior be changed to also trigger Genie? [1] <https://git.eclipse.org/r/#/c/45962/> [2] <https://git.eclipse.org/r/#/c/46099/>
Bug: XXXXX is acceptable, but I don't think we're examining the entire commit message. +1 on supporting this at the end of the commit message as well.
+1
+1 The format also works in cGit, e.g. for [1] from above: http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/?id=b7dea17ab82db2693a458b8117fde762689501c9 But I think it doesn't work in Bugzilla. Test: Bug: 465032
Regarding the position within the commit message: I've seen the patterns Bug 465045 - Workaround for Bug 123456 in component X Bug 465045 - Follow-up after Bug 123456 create see-also links in Bug 123456, which IMHO is wrong.
(In reply to Stephan Herrmann from comment #5) > Regarding the position within the commit message: I've seen the patterns > > Bug 465045 - Workaround for Bug 123456 in component X > Bug 465045 - Follow-up after Bug 123456 > > create see-also links in Bug 123456, which IMHO is wrong. That is a good point. We can examine the commit message line-by-line and use ^Bug: as the pattern. (In reply to Markus Keller from comment #3) > But I think it doesn't work in Bugzilla. Test: Bug: 465032 If there's an expectation that each pattern works everywhere, we'll cut back and reduce/standardize the patterns we linkify.
(In reply to Denis Roy from comment #6) > That is a good point. We can examine the commit message line-by-line and > use ^Bug: as the pattern. For the "Bug: xxxxxx" case, that's good. The Git convention [1] is actually to use only the last paragraph of a commit message for such "extra fields", but matching all lines shouldn't hurt. [1] https://wiki.eclipse.org/EGit/User_Guide#Footer_Tags For the "Bug xxxxxx" case, note that some committers write commit messages like "Fixed bug xxxxxx: <bug summary>". Without a colon, I think the Genie should just be triggered on the very first occurrence of "[Bb]ug\s*(\d+)" in the commit message.
any ETA when we can get this
Please can we get this fixed soon? We have this pattern in our style guide for EGit/JGit projects, and despite this one must always connect all commits & reviews manually to bugzilla.
Created https://github.com/eclipsewebmaster/admintools/pull/1 With the fix, "^Bug: (\d+)" overrides other bug references in the summary. This is to support e.g. commit messages like this: --- Fix NPE introduced by bug 12345 Bug: 54321 Signed-off-by: Fixer <fixer@example.com> ---
(In reply to Markus Keller from comment #11) > Created https://github.com/eclipsewebmaster/admintools/pull/1 > > With the fix, "^Bug: (\d+)" overrides other bug references in the summary. > This is to support e.g. commit messages like this: Thanks for the pull request! Should we make the pattern match m/([Bb]ug:?\s*#?)(\d+)/ as per line 106, for consistency? I'm sure some may wonder why bug 123456 or bug:123456 won't be supported.
(In reply to Denis Roy from comment #12) > (In reply to Markus Keller from comment #11) > > Created https://github.com/eclipsewebmaster/admintools/pull/1 > > > > With the fix, "^Bug: (\d+)" overrides other bug references in the summary. > > This is to support e.g. commit messages like this: > > Thanks for the pull request! > > Should we make the pattern match m/([Bb]ug:?\s*#?)(\d+)/ as per line 106, > for consistency? I'm sure some may wonder why bug 123456 or bug:123456 > won't be supported. I think that having kind of "standard" one-line attributes format like below is more consistent, relaxing it further is not necessary: Bug: 465045 Change-Id: sdfgsdfg Signed-off-by: sfgdgdsfg So can we get our "^Bug: (\d+)" pattern soon ? :-)
(In reply to Andrey Loskutov from comment #13) I agree, no more magic necessary for the footer tag. The footer format is pretty standardized in Git and we better support the standard only. The pattern in the subject line matches "prose text", so it's good that that one is forgiving. (In reply to Sam Davis from bug 434811 comment #62) > On the Mylyn project we use > > Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=12345 > > in the commit message footer, because providing a URL is more useful than > just a bug id. It would be nice to not have to also add bug: 12345 since it > would be redundant. Any chance of supporting this format too? That request was redirected to this bug. I think it makes sense to support full bug URLs as well. Sam, is "Task-Url:" really a widely-used footer tag? I'd prefer to only add: ^Bug: (?:https://bugs\.eclipse\.org/(?:bugs/show_bug\.cgi\?id=)?)?(\d+) That would support these formats: Bug: 12345 Bug: https://bugs.eclipse.org/12345 Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=12345 The last one is already recommended in https://wiki.eclipse.org/Development_Resources/Contributing_via_Git#The_Commit_Record
(In reply to Markus Keller from comment #14) > I'd prefer to only add: > ^Bug: (?:https://bugs\.eclipse\.org/(?:bugs/show_bug\.cgi\?id=)?)?(\d+) May I suggest: ^Bug: (?:https://bugs\.\w+\.org/(?:bugs/show_bug\.cgi\?id=)?)?(\d+) To support LocationTech and Polarsys bugs? Will you be updating your pull request? Andrey seems quite anxious :)
(In reply to Denis Roy from comment #15) > Will you be updating your pull request? Andrey seems quite anxious :) Done: https://github.com/eclipsewebmaster/admintools/pull/2 We can take care of the "Task-Url:" tag later or in another bug if really necessary.
(In reply to Markus Keller from comment #16) > (In reply to Denis Roy from comment #15) > > Will you be updating your pull request? Andrey seems quite anxious :) > > Done: https://github.com/eclipsewebmaster/admintools/pull/2 One last request: The regexp is actually not complete. The slashes would need to be escaped, and there's no / delimiter at the end. This regexp is complete, and using # as a delimiter avoids escaping slashes. With local sample data, it covers all three use cases of Bug: if($_ =~ m#^Bug: (?:https://bugs\.\w+\.org/(?:bugs/show_bug\.cgi\?id=)?)?(\d+)#) { If you can update your PR I will pull it in immediately and put it into production.
(In reply to Denis Roy from comment #17) > If you can update your PR I will pull it in immediately and put it into > production. I think I've just done that, but I'm a Github newbie. I just amended my commit and force-pushed it to the Github branch off which I had created the pull request. It looks like this has silently replaced my original pull request with the fixed patch.
Looks good to me. It's live now.
(In reply to comment #14) > Sam, is "Task-Url:" really a widely-used footer tag? Yes, this is in the default commit template provided by Mylyn. It would be nice to have the Eclipse Bugzilla support the default that contributors (to any Eclipse project) using Mylyn will put in their commit messages.
Gerrit change https://git.eclipse.org/r/51649 was merged to [master]. Commit: http://git.eclipse.org/c/websites/dev.eclipse.org.git/commit/?id=6386e79d4cc67d7c6e89d7c503510afebf518f7b
"Bug: xxxxxx" at the end of the commit message now works, as shown in the previous comment.
I've opened 472532: support Task-Url: in commit messages https://bugs.eclipse.org/bugs/show_bug.cgi?id=472532