From ffa80557dec91a17770a9cc28285ecf001df08f9 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 17 Mar 2014 13:05:02 +0200 Subject: [PATCH] Add Submitter to SR comment Submitter will be added to SR commit If 'submitter' key is present in meta. This key should be added by backend. Fixes: #1723 Change-Id: I731df88a247962467b849b9572b4ab9f85077d44 Signed-off-by: Ed Bartosh Reviewed-on: https://otctools.jf.intel.com/review/10666 Tested-by: OTC Tools Tester Reviewed-by: Markus Lehtonen --- repa/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repa/common.py b/repa/common.py index f375582..1d54309 100644 --- a/repa/common.py +++ b/repa/common.py @@ -78,8 +78,12 @@ def accept_or_reject(obs, submission, state, target, comment=''): print "submission %s" % str(name) commit = meta.get('git_commit') or meta['git_tag'] + submitter = meta.get('submitter') + message = '' + if submitter: + message = "Submitter: %s\n" % submitter - message = "Comments: %s \nGit project: %s\nTag: %s\nCommit: %s" \ + message += "Comments: %s \nGit project: %s\nTag: %s\nCommit: %s" \ % (comment or "submission %s" % str(name), meta['projects'][0], meta['git_tag'], -- 2.34.1