1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-10 08:03:16 +01:00

Fix 'git-obs pr create --target-branch'

This commit is contained in:
2025-03-20 10:40:21 +01:00
parent 8d57740c01
commit b8a810c0ee

View File

@@ -142,7 +142,9 @@ class PullRequestCreateCommand(osc.commandline_git.GitObsCommand):
# remote git repo - target
target_owner, target_repo = source_repo_data["parent"]["full_name"].split("/")
if source_branch.startswith("for/"):
if args.target_branch:
target_branch = args.target_branch
elif source_branch.startswith("for/"):
# source branch name format: for/<target-branch>/<what-the-branch-name-would-normally-be>
target_branch = source_branch.split("/")[1]
else: