Feature #51222 » 0006-scripts-ceph-backport.sh-display_url-when-firefox-is.patch
ceph-backport.sh | ||
---|---|---|
echo "$clipped"
|
||
}
|
||
function display_url {
|
||
local url="$1"
|
||
if [ "$display_url_stdout" ] ; then
|
||
echo "DISPLAY_URL: $url"
|
||
else
|
||
pgrep firefox >/dev/null && firefox "$url"
|
||
fi
|
||
}
|
||
function debug {
|
||
log debug "$@"
|
||
}
|
||
... | ... | |
if [ "$PR_PHASE" ] || [ "$EXISTING_PR" ] ; then
|
||
maybe_update_pr_milestone_labels
|
||
pgrep firefox >/dev/null && firefox "${backport_pr_url}"
|
||
display_url "${backport_pr_url}"
|
||
fi
|
||
if [ "$TRACKER_PHASE" ] ; then
|
||
... | ... | |
if [ "$tracker_is_in_desired_state" ] ; then
|
||
[ "$tracker_was_updated" ] && info "Backport tracker ${redmine_url} was updated"
|
||
info "Backport tracker ${redmine_url} is in the desired state"
|
||
pgrep firefox >/dev/null && firefox "${redmine_url}"
|
||
display_url "${redmine_url}"
|
||
exit 0
|
||
fi
|
||
if [ "$tracker_was_updated" ] ; then
|
||
warning "backport tracker ${redmine_url} was updated, but is not in the desired state. Please check it."
|
||
pgrep firefox >/dev/null && firefox "${redmine_url}"
|
||
display_url "${redmine_url}"
|
||
exit 1
|
||
else
|
||
data_binary="{\"issue\":{\"notes\":\"please link this Backport tracker issue with GitHub PR ${desc_should_be}\nceph-backport.sh version ${SCRIPT_VERSION}\"}}"
|