diff --git a/forgejo-test-helper.sh b/forgejo-test-helper.sh index a9aa07a..35fefdf 100755 --- a/forgejo-test-helper.sh +++ b/forgejo-test-helper.sh @@ -48,11 +48,6 @@ function push() { local self_action="$5" local token="$6" - if test -z "$token"; then - echo missing token argument - return 1 - fi - local dir="$DIR/$project" rsync -a $directory/ $dir/ @@ -87,6 +82,11 @@ function run_workflow() { local self_action="$5" local token="$6" + if test -z "$token"; then + echo missing token argument + return 1 + fi + push "$directory" "$url" "$owner" "$project" "$self_action" "$token" wait_success "$url" "$owner/$project" $(cat $DIR/$project/SHA) }