summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2017-04-18 14:09:26 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2017-04-18 14:09:28 +0200
commit678e30e8379edc77c6beb3459a681190a0fd0470 (patch)
tree622be38c8a280671a03c4dc48bb0fc0c01011aca
parentd5fd760c55ee38e7c7c8364e23bcc3d12decc8c9 (diff)
downloadansible-678e30e8379edc77c6beb3459a681190a0fd0470.tar.gz
ansible-678e30e8379edc77c6beb3459a681190a0fd0470.tar.xz
ansible-678e30e8379edc77c6beb3459a681190a0fd0470.zip
When sending alternative arch excluding emails, include the full change
Fixes https://pagure.io/fedora-infrastructure/issue/5923
-rwxr-xr-xroles/git/hooks/files/post-receive-alternativearch10
1 files changed, 9 insertions, 1 deletions
diff --git a/roles/git/hooks/files/post-receive-alternativearch b/roles/git/hooks/files/post-receive-alternativearch
index fcb175df4..3f843cf3e 100755
--- a/roles/git/hooks/files/post-receive-alternativearch
+++ b/roles/git/hooks/files/post-receive-alternativearch
@@ -35,6 +35,10 @@ Change:
%(change)s
Thanks.
+
+
+Full change:
+%(full_change)s
"""
def read_output(cmd, abspath, input=None, keepends=False, **kw):
@@ -158,11 +162,14 @@ def run_as_post_receive_hook():
if DEBUG:
print('List of commits:', new_commits_list)
+ full_change = ''
exclude_arch = {}
for commit in new_commits_list:
if DEBUG:
print('Diff of commit:', commit)
+ full_change += '\nCommit: %s\n' % commit
for line in read_git_lines(['show', commit], abspath):
+ full_change += '%s\n' % line
if DEBUG:
print(line)
if line.strip().startswith(PATTERNS):
@@ -185,7 +192,8 @@ def run_as_post_receive_hook():
send_email(
text=TEXT % dict(
- pkg=package, url='\n'.join(links), change="\n".join(diffs)
+ pkg=package, url='\n'.join(links), change="\n".join(diffs),
+ full_change=full_change
),
subject='Architecture specific change in %s' % package,
to_mail=TO_MAIL