mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user