diff --git a/discourse-release/announce.sh b/discourse-release/announce.sh index 41ffc89..701022f 100755 --- a/discourse-release/announce.sh +++ b/discourse-release/announce.sh @@ -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