From d1f8e17462309feab776456dc706bed6b1953ed5 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 14 Oct 2023 16:03:46 +0200 Subject: [PATCH] retry what might be asynchronous * opening the PR at destination because the branch that was created is not yet known to exist Fixes: https://code.forgejo.org/actions/cascading-pr/issues/1 --- cascading-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cascading-pr.sh b/cascading-pr.sh index 3b42f33..b003370 100755 --- a/cascading-pr.sh +++ b/cascading-pr.sh @@ -58,7 +58,7 @@ function upsert_pr() { return fi local title=$(pr_destination_title) - repo_curl ${options[destination_repo]} api_json --data-raw '{"title":"'"$title"'","base":"'${options[destination_base]}'","head":"'${options[destination_head]}'"}' ${options[destination_api]}/pulls > $TMPDIR/destination-pr.json + retry repo_curl ${options[destination_repo]} api_json --data-raw '{"title":"'"$title"'","base":"'${options[destination_base]}'","head":"'${options[destination_head]}'"}' ${options[destination_api]}/pulls > $TMPDIR/destination-pr.json log_info "PR created $(pr_url destination)" }