Gluster intends to move to github to track features being delivered against the code base. Read the announcement here: http://lists.gluster.org/pipermail/gluster-devel/2017-February/052203.html Specifics of the github process here: https://hackmd.io/s/BkgH8sdtg# Towards the above the following change is requested: ---------------------------------------------------- Like gerrit provides in the BUG value a link to bugzilla, is it possible to provide a link to an github issue when that is referenced in the commit message? That would be quite nice, instead of having to form the URL every time Example from the go gerrit site: https://go-review.googlesource.com/#/c/37148/
This should do the trick when added to the Gerrit config. So we'll need to do Fixes: gluster/glusterfs#12345 Fixes: gluster/glusterfs-specs#12345 [commentlink "githublink"] match = ([a-zA-Z0-9\-]+)\/([a-zA-Z0-9\-]+)#([0-9]*) link = "https://github.com/$1/$2/issues/$3
Actual config that worked on stage: [commentlink "githublink"] match = "([a-zA-Z\\d\\-]+)/([a-zA-Z\\d\\-]+)#(\\d+)" link = "https://github.com/$1/$2/issues/$3" This will need a Gerrit restart, so it'll take a few days to make it in.
Because we now get into a mix of numbers pointing to either Bugzilla or GitHub, I suggest to have the "BUG: 012345" replaced by URLs. The same approach needs to be done for GitHub issues. For someone reading the commit messages, a single well known source for bug reports and RFEs is easy, when we have two it will become confusing for many. If replacing the "BUG: .." is tricky, it may be easier to add a "Reported-on: https://bugzilla.redhat.com/1428032" and "Reported-on: https://github.com/....". matching the existing scheme for "Reviewed-on:".
(In reply to Niels de Vos from comment #3) > Because we now get into a mix of numbers pointing to either Bugzilla or > GitHub, I suggest to have the "BUG: 012345" replaced by URLs. The same We do not get a mix of numbers, we get BUG:12345 as BZ link, and get Fixes #n or Updates #n (or Fixes gluster/glusterfs#n or Updates gluster/glusterfs#12) as github links. This maybe an example of the same (as Nigel is playing with it), https://gerrit-stage.rht.gluster.org/#/c/16405/8 > approach needs to be done for GitHub issues. For someone reading the commit > messages, a single well known source for bug reports and RFEs is easy, when > we have two it will become confusing for many. Agreed, this is elegant, BUT I want this functionally ready soon, and optimized later. If both can be done at the same time by Nigel, or the approach that you suggest is the one we take now or in the future, I leave to Nigel. What is currently (being) done by Nigel is sufficient to get started and take to collaborators out there, and hence I would not like to delay that.
Shyam, take a look at this when you get some time -> https://review.gluster.org/#/c/16901/ (It's a draft and you're CC'd. Need to be logged in to see)
(In reply to Nigel Babu from comment #5) > Shyam, take a look at this when you get some time -> > https://review.gluster.org/#/c/16901/ (It's a draft and you're CC'd. Need to > be logged in to see) Checked the above and here are some questions: 1) We want the commit message to read "Fixes: #n" OR "Fixes: gluster/glusterfs#n" OR "Updates: #n" OR "Updates: gluster/gusterfs#n". Will the link substitution work for all of the above? 2) When a repo name is not mentioned in the commit message when referencing an issue # (for example: "Updates: #n") the default is gluster/glusterfs is the thought. I understand that later, some other repositories that end up using the same scheme, will have trouble if so, but we want this as the default for the glusterfs repo, so this is a repo specific default, IOW, a commit against repo <name> with no repo reference in the issue #, automatically becomes a link to an issue against that repo <name> 3) Just stating, we will not reference any issue in gluster-specs, we will submit patches to specs that refer to issues in glusterfs repo, like "Updates: gluster/glusterfs#n" 4) I think we should also enforce (if this is the right layer to do it), that either a Fixes/Updates keyword is present before the issue reference.
1) The link substitution will work for all mentions of #n or something/something#n. I may not be catching all the cases of something in the regex, but I should catch the practical ones for us. I does not force you to write Fixes: #n or Updates: #n. That can be enforced separately (git-branch-and-bug job?) 2) This is now done. See https://review.gluster.org/#/c/16901/ 3) I've copied the config over to glustefs-specs too. 4) I don't think this is the right layer to enforce it. This is just doing a regex match and linking for convenience. Can't do much enforcing here.