]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
script: ceph-backport.sh respects --force when PR is not merged in main 50576/head
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 17 Mar 2023 19:17:05 +0000 (20:17 +0100)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 17 Mar 2023 19:17:05 +0000 (20:17 +0100)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/script/ceph-backport.sh

index cdc0ea98ca66d4489c71d83868965930db59f43a..3a747a8cfc67f96b175f38fcbe64da0c67397352 100755 (executable)
@@ -232,9 +232,14 @@ function cherry_pick_phase {
     if [ "$merged" = "true" ] ; then
         true
     else
-        error "${original_pr_url} is not merged yet"
-        info "Cowardly refusing to perform automated cherry-pick"
-        false
+        if [ "$FORCE" ] ; then
+            warning "${original_pr_url} is not merged yet"
+            info "--force was given, so continuing anyway"
+        else
+            error "${original_pr_url} is not merged yet"
+            info "Cowardly refusing to perform automated cherry-pick"
+            false
+        fi
     fi
     number_of_commits=$(echo "${remote_api_output}" | jq '.commits')
     if [ "$number_of_commits" -eq "$number_of_commits" ] 2>/dev/null ; then