aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/mgagit/templates
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-12-22 13:31:11 +0000
committerColin Guthrie <colin@mageia.org>2013-12-22 13:31:11 +0000
commit5f87f97468726802da8fbd60f8adfb7652ca1b95 (patch)
tree95427bf88af8c7e93fea4c1e091ad5dc5f3fbe5f /deployment/mgagit/templates
parent20e4df30c485c9366f91b2c97ebf3db36b38e846 (diff)
downloadpuppet-5f87f97468726802da8fbd60f8adfb7652ca1b95.tar
puppet-5f87f97468726802da8fbd60f8adfb7652ca1b95.tar.gz
puppet-5f87f97468726802da8fbd60f8adfb7652ca1b95.tar.bz2
puppet-5f87f97468726802da8fbd60f8adfb7652ca1b95.tar.xz
puppet-5f87f97468726802da8fbd60f8adfb7652ca1b95.zip
mgagit: Match multiple bug references on a single line
Diffstat (limited to 'deployment/mgagit/templates')
-rwxr-xr-xdeployment/mgagit/templates/git-post-receive-hook11
1 files changed, 5 insertions, 6 deletions
diff --git a/deployment/mgagit/templates/git-post-receive-hook b/deployment/mgagit/templates/git-post-receive-hook
index 5cdc37f3..71235254 100755
--- a/deployment/mgagit/templates/git-post-receive-hook
+++ b/deployment/mgagit/templates/git-post-receive-hook
@@ -155,13 +155,12 @@ class LinksRevision(git_multimail.Revision):
if m:
commit = m.group(1);
for tracker in BUG_REFS.keys():
- m = BUG_REFS[tracker]['re'].search(line)
- if m:
- bug = m.group(1)
+ foundbugs = BUG_REFS[tracker]['re'].findall(line)
+ if len(foundbugs):
if not tracker in bugs:
- bugs[tracker] = [bug]
- elif not bug in bugs[tracker]:
- bugs[tracker].append(bug)
+ bugs[tracker] = foundbugs
+ else:
+ bugs[tracker] = list(set(bugs[tracker] + foundbugs))
return output