1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 01:06:15 +01:00

- change_request_state_template: support tgt_project and tgt_package in template (for backward compatibility the dst_ prefix is still supported)

This commit is contained in:
Marcus Huewe 2010-12-30 20:58:00 +01:00
parent 875fd86a31
commit 5bf59d2c60
2 changed files with 3 additions and 3 deletions

View File

@ -269,13 +269,13 @@ apiurl = %(apiurl)s
# template for an accepted submitrequest
#submitrequest_accepted_template = Hi %%(who)s,\\n
# thanks for working on:\\t%%(dst_project)s/%%(dst_package)s.
# thanks for working on:\\t%%(tgt_project)s/%%(tgt_package)s.
# SR %%(reqid)s has been accepted.\\n\\nYour maintainers
# template for a declined submitrequest
#submitrequest_declined_template = Hi %%(who)s,\\n
# sorry your SR %%(reqid)s (request type: %%(type)s) for
# %%(dst_project)s/%%(dst_package)s has been declined because...
# %%(tgt_project)s/%%(tgt_package)s has been declined because...
#review requests interactively (default: off)
#request_show_review = 1

View File

@ -3520,11 +3520,11 @@ def change_request_state_template(req, newstate):
tmpl = conf.config.get(tmpl_name, '')
tmpl = tmpl.replace('\\t', '\t').replace('\\n', '\n')
data = {'reqid': req.reqid, 'type': action.type, 'who': req.get_creator()}
# XXX: change also mapping key to tgt_ prefix
if req.actions[0].type == 'submit':
data.update({'src_project': action.src_project,
'src_package': action.src_package, 'src_rev': action.src_rev,
'dst_project': action.tgt_project, 'dst_package': action.tgt_package})
'tgt_project': action.tgt_project, 'tgt_package': action.tgt_package})
try:
return tmpl % data
except KeyError, e: