Skip to content

Commit ca994df

Browse files
authored
Add a reusable workflow to comment on release branch PRs (#2460)
* Add a reusable workflow to comment on release branch PRs * Allow dispatch for testing
1 parent bfaa807 commit ca994df

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/warn_release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on:
2+
workflow_call: # So it can be used by our other repos
3+
pull_request: # And also be used for itself
4+
branches: ['release*']
5+
workflow_dispatch: # manual trigger via GitHub UI
6+
7+
jobs:
8+
warn-release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/github-script@v7
12+
with:
13+
script: |
14+
github.rest.issues.createComment({
15+
issue_number: context.issue.number,
16+
owner: context.repo.owner,
17+
repo: context.repo.repo,
18+
body: `This is a release branch and commits are restricted.
19+
20+
Please confirm this PR is one of the following:
21+
22+
- [ ] A response to a customer ask
23+
- [ ] A change per our security policy
24+
- [ ] A non-functional change (i.e. changes needed for building an older version)
25+
- [ ] A change that has been granted an exception (please comment)
26+
})

0 commit comments

Comments
 (0)