From 3d6675b7ba4adf541cc27127927a86bf7912d950 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 2 Apr 2023 15:30:29 +0200 Subject: [PATCH] no need to check the token unless there is an action --- forgejo-test-helper.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) }