mirror of
https://code.forgejo.org/actions/cascading-pr
synced 2025-03-14 22:36:58 +01:00
read from the output instead of nothing
This commit is contained in:
parent
e35648c50c
commit
26490da8d2
1 changed files with 2 additions and 2 deletions
|
@ -235,11 +235,11 @@ function wait_destination_ci() {
|
|||
|
||||
function upsert_fork() {
|
||||
if repo_curl ${options[destination_repo]} api_json ${options[destination_fork_api]} > $TMPDIR/fork.json 2> /dev/null ; then
|
||||
if test "$(jq --raw-output .fork)" != true ; then
|
||||
if test "$(jq --raw-output .fork < $TMPDIR/fork.json)" != true ; then
|
||||
log_error "the destination fork already exists but is not a fork ${options[destination_fork]}"
|
||||
return 1
|
||||
fi
|
||||
local forked_from_repo=$(jq --raw-output .parent.full_name)
|
||||
local forked_from_repo=$(jq --raw-output .parent.full_name < $TMPDIR/fork.json)
|
||||
if test "$forked_from_repo" != "${options[destination_repo]}" ; then
|
||||
log_error "${options[destination_fork]} must be a fork of ${options[destination_repo]} but is a fork of $forked_from_repo instead"
|
||||
return 1
|
||||
|
|
Loading…
Add table
Reference in a new issue