Put commit id into the SR comment
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 17 Mar 2014 10:34:46 +0000 (12:34 +0200)
committerEduard Bartosh <eduard.bartosh@intel.com>
Mon, 17 Mar 2014 15:22:19 +0000 (17:22 +0200)
Current implementation puts git tag as a commit id into the SR comment.
This change will make repa to use git_commit from the meta if it's
present there. Backend should be also modified to put git_commit into
meta: https://otctools.jf.intel.com/pm/issues/1732

Fixes: #1709
Change-Id: Iae01404652160fb4d86a1c0236e226b28773d225
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
Reviewed-on: https://otctools.jf.intel.com/review/10664
Tested-by: OTC Tools Tester <ed.bartosh@linux.intel.com>
Reviewed-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
repa/common.py

index ac5b77dfb5cfcf6112eb4e5ed958a676f84b8b4a..f37558215de4934bab39d2a88ef59796bc347e9d 100644 (file)
@@ -77,11 +77,13 @@ def accept_or_reject(obs, submission, state, target, comment=''):
         # osc request accept [-m TEXT] ID
         print "submission %s" % str(name)
 
+        commit = meta.get('git_commit') or meta['git_tag']
+
         message = "Comments: %s \nGit project: %s\nTag: %s\nCommit: %s" \
             % (comment or "submission %s" % str(name),
               meta['projects'][0],
               meta['git_tag'],
-              meta['git_tag'])
+              commit)
 
         for pkg in obs.get_source_packages(project):
             # Create SR