Skip to content

Commit 8b9d579

Browse files
authored
Create comment-on-pr.yaml
1 parent 225f8e8 commit 8b9d579

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/comment-on-pr.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: comment-on-pr
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
branches:
8+
- beta/v[0-9]+.[0-9]+.[0-9]+
9+
10+
jobs:
11+
comment:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Create comments
15+
run: |
16+
cat << EOF > comments
17+
### Merging guidelines for the beta branch
18+
Please use `Squash and merge` as the default.
19+
However, when incorporating multiple changes with cherry-pick, use a `Create a merge commit` to preserve the changes in the history.
20+
EOF
21+
- name: Post comments
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
URL: ${{ github.event.pull_request.html_url }}
25+
run: gh pr comment -F ./comments "${URL}"

0 commit comments

Comments
 (0)