Skip to content

Commit

Permalink
moving to if else
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa committed Dec 13, 2024
1 parent 7fc3667 commit 8f09f24
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions ci/src/revisions/git_ci_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,14 @@ def main():
if hasattr(args, "command"):
repo_root = args.repo_root
branch = args.branch
match args.command:
case Command.SYNC_AND_CHECKOUT:
main_branch = args.main_branch
git_lib.sync_main_branch_and_checkout_branch(repo_root, main_branch, branch, logger)
return
case Command.COMMIT_AND_CREATE_PR:
repo = args.repo
files = args.files
message = args.message
git_lib.commit_and_create_pr(repo, repo_root, branch, files, logger, message)
return

if args.command == Command.SYNC_AND_CHECKOUT:
main_branch = args.main_branch
git_lib.sync_main_branch_and_checkout_branch(repo_root, main_branch, branch, logger)
elif args.command == Command.COMMIT_AND_CREATE_PR:
repo = args.repo
files = args.files
message = args.message
git_lib.commit_and_create_pr(repo, repo_root, branch, files, logger, message)
else:
parser.print_help()

Expand Down

0 comments on commit 8f09f24

Please sign in to comment.