mirror of
https://code.forgejo.org/actions/cascading-pr.git
synced 2025-06-28 04:43:44 +00:00
check the status of the cascaded PR
This commit is contained in:
parent
756e6eacb8
commit
b0c8a634f3
2 changed files with 12 additions and 12 deletions
|
@ -93,7 +93,7 @@ function check_status() {
|
|||
local api="$1"
|
||||
local sha="$2"
|
||||
local expected_status="$3"
|
||||
local expected_description="$3"
|
||||
local expected_description="$4"
|
||||
|
||||
get_status $api $sha > $TMPDIR/status.json
|
||||
local status="$(jq --raw-output .state < $TMPDIR/status.json)"
|
||||
|
@ -130,9 +130,9 @@ function wait_log() {
|
|||
}
|
||||
|
||||
function wait_status() {
|
||||
local status="$1"
|
||||
local api="$2"
|
||||
local sha="$3"
|
||||
local status="$1"
|
||||
local description="$4"
|
||||
|
||||
for i in $(seq $LOOPS); do
|
||||
|
@ -145,7 +145,7 @@ function wait_status() {
|
|||
if test $(check_status "$api" "$sha" "$status" "$description") = "OK" ; then
|
||||
log_info "$sha status OK"
|
||||
else
|
||||
get_status $url $repo $sha | jq .statuses
|
||||
get_status $api $sha | jq .statuses
|
||||
log_info "$sha status NOK"
|
||||
return 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue