Skip to content

Commit 3ffa1f5

Browse files
Install auto-approve script
Signed-off-by: Christian Wolf <[email protected]>
1 parent 03d01c8 commit 3ffa1f5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Slack-like comments
2+
on:
3+
issue_comment:
4+
types:
5+
- "created"
6+
- "edited"
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
approve-pr:
14+
name: Approve PR
15+
runs-on: ubuntu-latest
16+
if: ${ github.event.issue.pull_request }
17+
steps:
18+
- run: |-
19+
echo "User association: ${{ github.event.comment.user_association }}"
20+
echo "Comment body matches /approve: ${{github.event.comment.body == '/approve'}}"
21+
- uses: hmarr/auto-approve-action@v2
22+
if: >-
23+
github.event.comment.body == '/approve' &&
24+
github.event.comment.user_association == 'OWNER'
25+
with:
26+
github-token: ${{ secrets.COOKBOOK_BOT_TOKEN }}
27+
pull-request-number: ${{ github.event.issue.number }}
28+
review-message: "Automatically approved by GitHub action on behalf of `/approve`"
29+

0 commit comments

Comments
 (0)