Skip to content

Commit 42b21f6

Browse files
committed
ciq-cherry-pick.py: Use CIQ_run_git for cherry picking the commit
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>
1 parent f4a2b42 commit 42b21f6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ciq-cherry-pick.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ def cherry_pick(sha, ciq_tags, jira_ticket):
9292
check_fixes(sha=full_sha)
9393

9494
# Commit message is in MERGE_MSG
95-
git_res = subprocess.run(["git", "cherry-pick", "-nsx", full_sha])
96-
commit_successful = git_res.returncode == 0
95+
commit_successful = True
96+
try:
97+
CIQ_run_git(repo_path=os.getcwd(), args=["cherry-pick", "-nsx", full_sha])
98+
except RuntimeError:
99+
commit_successful = False
100+
97101
manage_commit_message(
98102
full_sha=full_sha, ciq_tags=ciq_tags, jira_ticket=jira_ticket, commit_successful=commit_successful
99103
)
@@ -102,7 +106,6 @@ def cherry_pick(sha, ciq_tags, jira_ticket):
102106
error_str = (
103107
f"[FAILED] git cherry-pick -nsx {full_sha}\n"
104108
"Manually resolve conflict and add explanation under `upstream-diff` tag in commit message\n"
105-
f"Subprocess Call: {git_res}"
106109
)
107110
raise RuntimeError(error_str)
108111

0 commit comments

Comments
 (0)