1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

print web links on osc mr

print web_links also on maintenance requests when print_web_links=1
is configured in oscrc
This commit is contained in:
lethliel 2020-07-07 08:49:36 +02:00
parent ce291abac6
commit ce794cb37d

View File

@ -3329,6 +3329,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
r = create_maintenance_request(apiurl, source_project, source_packages, target_project, release_project, opt_sourceupdate, opts.message, opts.enforce_branching)
print(r.reqid)
if conf.config['print_web_links']:
root = ET.fromstring(b''.join(show_configuration(apiurl)))
node = root.find('obs_url')
if node is None or not node.text:
raise oscerr.APIError('obs_url configuration element expected')
obs_url = node.text
print('%s/request/show/%s' % (obs_url, r.reqid))
if supersede_existing:
for req in reqs: