summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorRadosław Zarzyński <rzarzyns@redhat.com>2023-03-17 20:17:05 +0100
committerRadosław Zarzyński <rzarzyns@redhat.com>2023-03-17 20:17:05 +0100
commit45026670596df98b69d9a3e6d9d03e812c2046b5 (patch)
treee51e61b2ff21c539f0f7436dcbdd8720c4c54a67 /src/script
parentMerge pull request #50498 from rishabh-d-dave/fs-qa-caps-helper-minor (diff)
downloadceph-45026670596df98b69d9a3e6d9d03e812c2046b5.tar.xz
ceph-45026670596df98b69d9a3e6d9d03e812c2046b5.zip
script: ceph-backport.sh respects --force when PR is not merged in main
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/ceph-backport.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh
index cdc0ea98ca6..3a747a8cfc6 100755
--- a/src/script/ceph-backport.sh
+++ b/src/script/ceph-backport.sh
@@ -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