Skip to content

Commit

Permalink
Merge pull request #50576 from rzarzynski/wip-script-unmerged-backport
Browse files Browse the repository at this point in the history
script: ceph-backport.sh respects --force when  PR is not merged in main

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
  • Loading branch information
rzarzynski committed Jun 3, 2023
2 parents 078bfe8 + 4502667 commit 4d3e964
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/script/ceph-backport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d3e964

Please sign in to comment.