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:
parent
875fd86a31
commit
5bf59d2c60
@ -269,13 +269,13 @@ apiurl = %(apiurl)s
|
|||||||
|
|
||||||
# template for an accepted submitrequest
|
# template for an accepted submitrequest
|
||||||
#submitrequest_accepted_template = Hi %%(who)s,\\n
|
#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
|
# SR %%(reqid)s has been accepted.\\n\\nYour maintainers
|
||||||
|
|
||||||
# template for a declined submitrequest
|
# template for a declined submitrequest
|
||||||
#submitrequest_declined_template = Hi %%(who)s,\\n
|
#submitrequest_declined_template = Hi %%(who)s,\\n
|
||||||
# sorry your SR %%(reqid)s (request type: %%(type)s) for
|
# 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)
|
#review requests interactively (default: off)
|
||||||
#request_show_review = 1
|
#request_show_review = 1
|
||||||
|
@ -3520,11 +3520,11 @@ def change_request_state_template(req, newstate):
|
|||||||
tmpl = conf.config.get(tmpl_name, '')
|
tmpl = conf.config.get(tmpl_name, '')
|
||||||
tmpl = tmpl.replace('\\t', '\t').replace('\\n', '\n')
|
tmpl = tmpl.replace('\\t', '\t').replace('\\n', '\n')
|
||||||
data = {'reqid': req.reqid, 'type': action.type, 'who': req.get_creator()}
|
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':
|
if req.actions[0].type == 'submit':
|
||||||
data.update({'src_project': action.src_project,
|
data.update({'src_project': action.src_project,
|
||||||
'src_package': action.src_package, 'src_rev': action.src_rev,
|
'src_package': action.src_package, 'src_rev': action.src_rev,
|
||||||
'dst_project': action.tgt_project, 'dst_package': action.tgt_package})
|
'dst_project': action.tgt_project, 'dst_package': action.tgt_package})
|
||||||
|
'tgt_project': action.tgt_project, 'tgt_package': action.tgt_package})
|
||||||
try:
|
try:
|
||||||
return tmpl % data
|
return tmpl % data
|
||||||
except KeyError, e:
|
except KeyError, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user