From 46a17b1df5e859964a0e5cede4ff1af387c6eb42 Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Wed, 11 Nov 2026 21:58:02 +0000 Subject: [PATCH] fix: report success for merge queue groups The organization ruleset requires this workflow, but it only ran on pull request events, so a repository with a merge queue waited forever for it on each merge group. Run on merge_group too and skip the job there: there is nothing to request, and the queue's own required checks decide the merge. --- .github/workflows/auto-merge.yml | 4 ++++ README.md | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index bfa000e..603224c 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -3,6 +3,9 @@ name: Request Auto-Merge on: pull_request_target: types: [opened, synchronize, reopened, ready_for_review] + # Repositories with a merge queue require this workflow on the queue's merge groups too. There is + # nothing to request there, so the job is skipped and the workflow reports success. + merge_group: permissions: contents: read @@ -11,6 +14,7 @@ permissions: jobs: request-auto-merge: if: >- + github.event_name == 'pull_request_target' && !github.event.pull_request.draft && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest diff --git a/README.md b/README.md index 11eb3c5..6ac5342 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ events that invoke the organization workflow. The organization ruleset applies this workflow to Chio Labs public repositories. +The workflow also runs on merge queue groups, because the ruleset requires it there; its job is +skipped and it reports success, leaving the queue's own required checks to decide. + Draft and fork-based pull requests are intentionally excluded. A draft is handled when it becomes ready for review. Product workflows remain responsible for release-specific validation, while this organization workflow is the single owner of requesting auto-merge.