Skip to content

Commit 10c8997

Browse files
authored
Merge pull request #1421 from github/cklin/fix-update-required-checks-sha
update-required-checks.sh: fix argument handling
2 parents 104319f + 4a5ad5a commit 10c8997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010

1111
if [ "$#" -eq 1 ]; then
1212
# If we were passed an argument, use that as the SHA
13-
GITHUB_SHA="$0"
13+
GITHUB_SHA="$1"
1414
elif [ "$#" -gt 1 ]; then
1515
echo "Usage: $0 [SHA]"
1616
echo "Update the required checks based on the SHA, or main."
@@ -23,7 +23,7 @@ fi
2323
echo "Getting checks for $GITHUB_SHA"
2424

2525
# Ignore any checks with "https://", CodeQL, LGTM, and Update checks.
26-
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 . == "LGTM.com" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
26+
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 . == "LGTM.com" or . == "check-expected-release-files" or contains("Update") or contains("update") or contains("test-setup-python-scripts") | not)] | unique | sort')"
2727

2828
echo "$CHECKS" | jq
2929

0 commit comments

Comments
 (0)