Skip to content

Commit 711cfa4

Browse files
Refactor: move should_skip logic inside PR event check block
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
1 parent 70bf076 commit 711cfa4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/test-all-warehouses.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ jobs:
5252
if [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.repository }}" ]]; then
5353
IS_FORK="true"
5454
fi
55-
fi
5655
57-
# Skip if: pull_request from fork (should use pull_request_target) OR pull_request_target from non-fork (should use pull_request)
58-
if [[ "${{ github.event_name }}" == "pull_request" && "$IS_FORK" == "true" ]]; then
59-
SHOULD_SKIP="true"
60-
elif [[ "${{ github.event_name }}" == "pull_request_target" && "$IS_FORK" == "false" ]]; then
61-
SHOULD_SKIP="true"
56+
# Skip if: pull_request from fork (should use pull_request_target) OR pull_request_target from non-fork (should use pull_request)
57+
if [[ "${{ github.event_name }}" == "pull_request" && "$IS_FORK" == "true" ]]; then
58+
SHOULD_SKIP="true"
59+
elif [[ "${{ github.event_name }}" == "pull_request_target" && "$IS_FORK" == "false" ]]; then
60+
SHOULD_SKIP="true"
61+
fi
6262
fi
6363
6464
echo "is_fork=$IS_FORK" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)