Skip to content

Commit f03da13

Browse files
committed
Exclude push-only unit tests job from required PR checks script
1 parent 9c646c2 commit f03da13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/script/update-required-checks.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ fi
2828
echo "Getting checks for $GITHUB_SHA"
2929

3030
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
31-
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
31+
# Also ignore the non-matrixed "Unit Tests" job that only runs on pushes to protected branches.
32+
CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or . == "Unit Tests" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
3233

3334
echo "$CHECKS" | jq
3435

0 commit comments

Comments
 (0)