discourse-release: treat "External has already been taken" as already announced #5
@@ -57,7 +57,9 @@ case "$status" in
|
||||
url="$FORUM/t/$(jq -r '.topic_slug' <<<"$body")/$(jq -r '.topic_id' <<<"$body")"
|
||||
echo "announced: $url" ;;
|
||||
422)
|
||||
if jq -e '.errors | tostring | test("External ID"; "i")' <<<"$body" >/dev/null; then
|
||||
# Discourse words this "External has already been taken" (older versions:
|
||||
# "External ID ..."); a racing run can also hit the title check first.
|
||||
if jq -e '.errors | tostring | test("External( ID| has already been taken)|title has already been used"; "i")' <<<"$body" >/dev/null; then
|
||||
echo "already announced (external_id $external_id); nothing to do"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user