From add423f7624133bc24f54f04c2a08ca243e01c69 Mon Sep 17 00:00:00 2001 From: Christine Chen <10511452+christineschen@users.noreply.github.com> Date: Mon, 22 Jun 2026 11:59:27 -0400 Subject: [PATCH] fix: add updated workflow with corrected bot username and event handling - Add 'opened' trigger to catch PRs when bot immediately applies label - Fix bot username to github-actions[bot] (verified via API and commit history) - Restructure condition to handle both 'labeled' and 'opened' events * 'labeled': uses github.event.label.name * 'opened': uses github.event.pull_request.labels.*.name * Prevents 'opened' event from failing due to missing github.event.label This enables the auto-merge workflow to work with Speakeasy SDK generation PRs. --- .github/workflows/auto-merge-speakeasy-pr.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-merge-speakeasy-pr.yaml b/.github/workflows/auto-merge-speakeasy-pr.yaml index ee2795e..9ba77ed 100644 --- a/.github/workflows/auto-merge-speakeasy-pr.yaml +++ b/.github/workflows/auto-merge-speakeasy-pr.yaml @@ -18,11 +18,17 @@ concurrency: jobs: auto-merge: if: | - github.event.sender.login == 'app/github-actions' && - github.event.pull_request.user.login == 'app/github-actions' && + github.event.sender.login == 'github-actions[bot]' && + github.event.pull_request.user.login == 'github-actions[bot]' && startsWith(github.event.pull_request.head.ref, 'speakeasy-sdk-regen-') && contains(github.event.pull_request.title, '🐝 Update SDK') && - contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name) + ( + (github.event.action == 'labeled' && contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)) || + (github.event.action == 'opened' && + (contains(github.event.pull_request.labels.*.name, 'patch') || + contains(github.event.pull_request.labels.*.name, 'minor') || + contains(github.event.pull_request.labels.*.name, 'major'))) + ) runs-on: ubuntu-latest steps: - name: Close superseded Speakeasy PRs