From ba79a4f0b940b7145973a1b844ab2c6332af8311 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 9 Oct 2026 09:55:02 +0100 Subject: [PATCH 1/3] Do not run `pr-checks` for all push events --- .github/workflows/pr-checks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 2ae0594407..aa8d15c10e 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -2,6 +2,9 @@ name: PR Checks on: push: + branches: + - "main" + - "releases/v*" pull_request: merge_group: types: [checks_requested] From 2883b5b5db290dd67f1501acbde11ac5da9c1a01 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 9 Oct 2026 10:02:12 +0100 Subject: [PATCH 2/3] Fix conditions in `pr-checks` workflow --- .github/workflows/pr-checks.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index aa8d15c10e..1036cfa284 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -148,12 +148,11 @@ jobs: - name: Fetch base commit id: fetch-base - # Forks and Dependabot PRs don't have permission to write comments, so skip the repo size - # check in those cases. + # Skip this (and subsequent steps) if the PR originates from a fork, since this workflow + # won't have the necessary permissions to post comments on the PR. if: >- github.event_name == 'pull_request' && - github.event.pull_request.head.repo.full_name == github.repository && - github.event.pull_request.user.login != 'dependabot[bot]' + github.event.pull_request.head.repo.full_name == github.repository env: BASE_SHA: ${{ github.event.pull_request.base.sha }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} @@ -212,7 +211,7 @@ jobs: if: >- github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && - github.event.pull_request.user.login != 'dependabot[bot]' && + github.triggering_actor != 'dependabot[bot]' && needs.other-checks.result == 'success' permissions: contents: read From a6ff2ad52a40a9b23b69a8b73d442a64ac5d800f Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 9 Oct 2026 14:30:58 +0100 Subject: [PATCH 3/3] Use `github.actor` for `post-repo-size-comment` condition --- .github/workflows/pr-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 1036cfa284..476764219b 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -211,7 +211,7 @@ jobs: if: >- github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && - github.triggering_actor != 'dependabot[bot]' && + github.actor != 'dependabot[bot]' && needs.other-checks.result == 'success' permissions: contents: read