Skip to content

Commit

Permalink
Improve 'maintenancerequest' command to inherit description from supe…
Browse files Browse the repository at this point in the history
…rseded request

Commit 083fdf3 introduced a feature for the 'submitrequest' command
where the submission description is pre-populated with one of a superseded
request.
Here, the same is introduced for the `maintenancerequest` command.
The behavior of `osc mr -s 1234` is identical to `osc sr -s 1234` - see Issue 1575.

Signed-off-by: Egbert Eich <[email protected]>
  • Loading branch information
e4t committed Feb 13, 2025
1 parent 0b4f394 commit 80b54b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4259,7 +4259,14 @@ def do_maintenancerequest(self, subcmd, opts, *args):
print(f'Using target project \'{target_project}\'{release_in}')

if not opts.message:
opts.message = edit_message()
msg = ""
if opts.supersede:
from .obs_api import Request

req = Request.from_api(apiurl, opts.supersede)
msg = req.description + "\n"
opts.message = edit_message(template=f"{msg}")


supersede_existing = False
reqs = []
Expand Down

0 comments on commit 80b54b1

Please sign in to comment.