mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-10 07:22:17 +00:00
ci(backport): fix issue creation on cherry-pick conflict (#9048)
ci(backport): properly create issue on cherry-pick conflict Signed-off-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
@@ -68,13 +68,16 @@ jobs:
|
||||
git checkout -b "${head_branch}" "origin/${release_branch}"
|
||||
|
||||
if ! git cherry-pick -x "${MERGE_COMMIT}"; then
|
||||
echo "ERROR: Cherry-pick failed for ${release_branch}. Creating an issue instead."
|
||||
echo "ERROR: Cherry-pick failed for ${release_branch}. Aborting and creating an issue instead."
|
||||
# Abort and clean up first so the repo is back to a sane state,
|
||||
# even if the issue creation below fails.
|
||||
git cherry-pick --abort
|
||||
git checkout -f "${BASE_BRANCH}"
|
||||
git branch -D "${head_branch}"
|
||||
gh issue create \
|
||||
--title "Backport failure: PR #${PR_NUMBER} to ${release_branch}" \
|
||||
--body "Cherry-pick of ${MERGE_COMMIT} (PR #${PR_NUMBER}) failed on ${release_branch}. Manual backport required." \
|
||||
git cherry-pick --abort
|
||||
git checkout "${BASE_BRANCH}"
|
||||
git branch -D "${head_branch}"
|
||||
|| true
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user