From 7adb33da1dc7d3651ba7380e88fc64f9acab4cd1 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Thu, 16 Jun 2022 20:31:29 -0700 Subject: [PATCH] Ensure there are no duplicates when sending up required checks This breaks the API. Also, fix the checks that had duplicate names. --- .github/workflows/expected-queries-runs.yml | 1 + .github/workflows/query-filters.yml | 3 ++- .github/workflows/script/update-required-checks.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/expected-queries-runs.yml b/.github/workflows/expected-queries-runs.yml index 270e0d84ea..3e011f9342 100644 --- a/.github/workflows/expected-queries-runs.yml +++ b/.github/workflows/expected-queries-runs.yml @@ -16,6 +16,7 @@ on: jobs: expected-queries: + name: Expected Queries Tests timeout-minutes: 45 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/query-filters.yml b/.github/workflows/query-filters.yml index 693f2b806d..864a4fdbeb 100644 --- a/.github/workflows/query-filters.yml +++ b/.github/workflows/query-filters.yml @@ -15,7 +15,8 @@ on: workflow_dispatch: {} jobs: - expected-queries: + query-filters: + name: Query Filters Tests timeout-minutes: 45 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/script/update-required-checks.sh b/.github/workflows/script/update-required-checks.sh index 13a825f994..46672c4585 100755 --- a/.github/workflows/script/update-required-checks.sh +++ b/.github/workflows/script/update-required-checks.sh @@ -21,7 +21,7 @@ fi echo "Getting checks for $GITHUB_SHA" # Ignore any checks with "https://", CodeQL, LGTM, and Update checks. -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") | not)] | sort')" +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") | not)] | unique | sort')" echo "$CHECKS" | jq