From 66fc546cfe1aa2b2998a6cfb6a32bd81b44d3d95 Mon Sep 17 00:00:00 2001 From: Houssem Ben Ali Date: Thu, 2 Mar 2023 15:14:25 +0100 Subject: [PATCH] Fix typo --- github/backportPR.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/github/backportPR.sh b/github/backportPR.sh index d98c1ebf..fc61c101 100755 --- a/github/backportPR.sh +++ b/github/backportPR.sh @@ -30,7 +30,7 @@ fi echo "OK PR is merged." echo "Checking PR merge commit" PR_MERGE_COMMIT=$(getJsonItem merge_commit_sha) -echo "OK PR merge status is ${PR_MERGE_COMMIT}" +echo "OK PR merge commit is ${PR_MERGE_COMMIT}" PR_TITLE=$(getJsonItem title) PR_BODY=$(getJsonItem body) PR_OWNER=$(getJsonItem user.login) @@ -39,7 +39,7 @@ git clone $PR_CLONE_URL &>/dev/null pushd ${PR_REPO} git checkout ${TARGET_BASE_BRANCH} &>/dev/null git checkout -b backport_$(date +%s) -if !git cherry-pick -x ${PR_MERGE_COMMIT}; then +if ! git cherry-pick -x ${PR_MERGE_COMMIT}; then git cherry-pick --abort &>/dev/null || true echo "Cherry-pick failed! Performing patch method..." PR_PATCH_URL=$(getJsonItem patch_url) @@ -60,4 +60,4 @@ git push origin HEAD if [ ${REVIEWERS:-} = "_OWNER_" ]; then REVIEWERS=$PR_OWNER fi -gh pr create --repo $PR_CLONE_URL --title "${PR_TITLE}" --body "${PR_BODY}" --reviewers "${REVIEWERS}" --assignee "${PR_OWNER}" --base "${TARGET_BASE_BRANCH}" --branch HEAD \ No newline at end of file +gh pr create --repo $PR_CLONE_URL -f --reviewer "${REVIEWERS}" --assignee "${PR_OWNER}" --base "${TARGET_BASE_BRANCH}" \ No newline at end of file