Skip to content

Commit 7b4b9fe

Browse files
fix: update auto-merge workflow triggers and bot username (#345)
2 parents 8e63704 + add423f commit 7b4b9fe

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/auto-merge-speakeasy-pr.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Auto-merge Speakeasy PR
55

66
on:
77
pull_request:
8-
types: [labeled]
8+
types: [labeled, opened]
99

1010
permissions:
1111
contents: write
@@ -22,7 +22,13 @@ jobs:
2222
github.event.pull_request.user.login == 'github-actions[bot]' &&
2323
startsWith(github.event.pull_request.head.ref, 'speakeasy-sdk-regen-') &&
2424
contains(github.event.pull_request.title, '🐝 Update SDK') &&
25-
contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)
25+
(
26+
(github.event.action == 'labeled' && contains(fromJSON('["patch", "minor", "major"]'), github.event.label.name)) ||
27+
(github.event.action == 'opened' &&
28+
(contains(github.event.pull_request.labels.*.name, 'patch') ||
29+
contains(github.event.pull_request.labels.*.name, 'minor') ||
30+
contains(github.event.pull_request.labels.*.name, 'major')))
31+
)
2632
runs-on: ubuntu-latest
2733
steps:
2834
- name: Close superseded Speakeasy PRs

0 commit comments

Comments
 (0)