From 678e30e8379edc77c6beb3459a681190a0fd0470 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 18 Apr 2017 14:09:26 +0200 Subject: [PATCH] When sending alternative arch excluding emails, include the full change Fixes https://pagure.io/fedora-infrastructure/issue/5923 --- roles/git/hooks/files/post-receive-alternativearch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/git/hooks/files/post-receive-alternativearch b/roles/git/hooks/files/post-receive-alternativearch index fcb175df4e..3f843cf3e8 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