Skip to content

Commit e27b9f3

Browse files
fix: update auto-bumper workflow conditions to check for open PRs and specific comment triggers
1 parent 40d34c0 commit e27b9f3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/auto-bumper.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ permissions:
1313
jobs:
1414
respond:
1515
runs-on: ubuntu-latest
16-
if: (contains( github.event.pull_request.labels.*.name, 'auto-bump') || (contains(github.event.comment.body, '@github-bot') && contains(github.event.comment.body, 'bump')))
16+
if: >
17+
github.event.issue.pull_request &&
18+
github.event.action == 'created' &&
19+
(contains(github.event.comment.body, '@github-bot') && contains(github.event.comment.body, 'bump'))
1720
steps:
1821
- name: Check permissions (maintainer-only)
1922
id: perm
@@ -159,6 +162,10 @@ jobs:
159162
repo: context.repo.repo,
160163
pull_number: prNumber,
161164
});
165+
if (pr.state !== 'open') {
166+
core.setFailed('PR is not open. Aborting.');
167+
return;
168+
}
162169
core.setOutput('branch', pr.head.ref);
163170
164171
- name: Commit changes

0 commit comments

Comments
 (0)