return type_name
IS_SUBMIT_REQUEST=True
-def submit_request(project, branch, commit, tagname):
+def submit_request(project, branch, commit, tagname, tagger=None):
"""
Submit Request
"""
gitprj.set_branch(branch)
print 'set branch'
+ # Register local git user
+ if tagger is not None:
+ with open(os.path.join(gitprj.path, '.git', 'config'), 'a') as gitconfig:
+ gitconfig.write('[user]\n\tname = %s\n\temail = %s\n' \
+ % (tagger.split('@')[0], tagger))
gitprj.checkout(commit)
print 'checkout'
gitprj.create_tag(tagname, message)
sync_history_id = content.get('sync_history_id')
tagname = content.get('sr_tag')
pkg_sync_list = content.get('package_list')
+ sync_requester_email = content.get('triggered_by')
if not pkg_info_url:
print 'Error : Can not parse from package-info.xml'
merge_successs.append((private_project, '%s -> %s' %(commit, commit)))
if IS_SUBMIT_REQUEST:
- ret = submit_request(project=private_project, branch=branch, commit=commit, tagname=tagname)
+ ret = submit_request(project=private_project, branch=branch, commit=commit, \
+ tagname=tagname, tagger=sync_requester_email)
if not ret:
raise SubmitRequestError('submit request failed(%s, %s)' % (private_project, commit))
submit_request_successs.append((private_project, commit, tagname))
merge_successs.append((private_project, '%s -> %s' %(commit, merge_commit)))
if IS_SUBMIT_REQUEST:
- ret = submit_request(project=private_project, branch=branch, commit=merge_commit, tagname=tagname)
+ ret = submit_request(project=private_project, branch=branch, commit=merge_commit, \
+ tagname=tagname, tagger=sync_requester_email)
if not ret:
raise SubmitRequestError('submit request failed(%s, %s)' % (private_project, merge_commit))
submit_request_successs.append((private_project, merge_commit, tagname))