diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 154c21c7b9..92f5e24b3c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -66,7 +66,7 @@ jobs: # # If we're running on push or schedule, then we can skip running with `tools: linked` when it would be # the same as running with `tools: null`. - if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then + if [[ "$GITHUB_EVENT_NAME" != "pull_request" && "$GITHUB_EVENT_NAME" != "merge_group" && "$CODEQL_VERSION_DEFAULT" == "$CODEQL_VERSION_LATEST" ]]; then VERSIONS_JSON='[null]' else VERSIONS_JSON='[null, "linked"]' @@ -110,7 +110,7 @@ jobs: uses: ./analyze with: category: "/language:javascript" - upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && 'always') || 'never' }} + upload: ${{ (matrix.os == 'ubuntu-24.04' && !matrix.tools && github.event_name != 'merge_group' && 'always' ) || 'never' }} analyze-other: if: github.triggering_actor != 'dependabot[bot]' @@ -145,3 +145,4 @@ jobs: uses: ./analyze with: category: "/language:${{ matrix.language }}" + upload: ${{ (github.event_name != 'merge_group' && 'always') || 'never' }} diff --git a/.github/workflows/codescanning-config-cli.yml b/.github/workflows/codescanning-config-cli.yml index ca3b554a9f..bf6d90fbf7 100644 --- a/.github/workflows/codescanning-config-cli.yml +++ b/.github/workflows/codescanning-config-cli.yml @@ -80,7 +80,7 @@ jobs: # On PRs, overlay analysis may change the config that is passed to the CLI. # Therefore, we have two variants of the following test, one for PRs and one for other events. - name: Empty file (non-PR) - if: github.event_name != 'pull_request' && github.event_name != 'merge_group' + if: github.event_name != 'pull_request' uses: ./../action/.github/actions/check-codescanning-config with: expected-config-file-contents: "{}" @@ -88,7 +88,7 @@ jobs: tools: ${{ steps.prepare-test.outputs.tools-url }} - name: Empty file (PR) - if: github.event_name == 'pull_request' || github.event_name == 'merge_group' + if: github.event_name == 'pull_request' uses: ./../action/.github/actions/check-codescanning-config with: expected-config-file-contents: | diff --git a/.github/workflows/script/update-required-checks.sh b/.github/workflows/script/update-required-checks.sh index 8a930cae74..f6a4c4f5c8 100755 --- a/.github/workflows/script/update-required-checks.sh +++ b/.github/workflows/script/update-required-checks.sh @@ -29,7 +29,7 @@ fi echo "Getting checks for $GITHUB_SHA" # Ignore any checks with "https://", CodeQL, LGTM, Update, and ESLint checks. -CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("ESLint") or contains("update") or contains("test-setup-python-scripts") or . == "Agent" or . == "Cleanup artifacts" or . == "Prepare" or . == "Upload results" | not)] | unique | sort')" +CHECKS="$(gh api repos/github/codeql-action/commits/"${GITHUB_SHA}"/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs.[] | select(.conclusion != "skipped") | .name | select(contains("https://") or . == "CodeQL" or . == "Dependabot" or . == "check-expected-release-files" or contains("Update") or contains("ESLint") or contains("update") or contains("test-setup-python-scripts") or . == "Agent" or . == "Cleanup artifacts" or . == "Prepare" or . == "Upload results" or . == "Label PR with size" | not)] | unique | sort')" echo "$CHECKS" | jq