Skip to content

Commit bf3f3ac

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 445f061 commit bf3f3ac

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

ciq-cherry-pick.py

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

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

0 commit comments

Comments
 (0)