Signed-off-by: Nathan Cutler <ncutler@suse.com>
function cherry_pick_phase {
local base_branch=
+ local merged=
local number_of_commits=
local offset=0
local singular_or_plural_commit=
info "You can still use the script to stage the backport, though. Just prepare the local branch \"${local_branch}\" manually and re-run the script."
false
fi
+ merged=$(echo ${remote_api_output} | jq -r .merged)
+ if [ "$merged" = "true" ] ; then
+ true
+ else
+ error "${original_pr_url} is not merged yet: cowardly refusing to perform automated cherry-pick"
+ false
+ fi
number_of_commits=$(echo ${remote_api_output} | jq .commits)
if [ "$number_of_commits" -eq "$number_of_commits" ] 2>/dev/null ; then
# \$number_of_commits is set, and is an integer