Skip to content

Commit

Permalink
feat: add auto-approve.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Doeunnkimm committed Jun 21, 2024
1 parent f283c80 commit 3d71b46
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto Approve PR

on:
pull_request:
types: [labeled]

jobs:
auto-approve:
if: github.event.label.name == 'auto approve'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Auto approve PR
uses: hmarr/auto-approve-action@v2.0.0
with:
github-token: ${{ secrets.ACCESS_TOKEN }}

- name: Comment on PR
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
curl -s -X POST \
-H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"body\":\"๊ณ ์ƒํ–ˆ๋‹ค. ๐ŸŽ‰๐Ÿ‘๐Ÿฝ\"}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"

0 comments on commit 3d71b46

Please sign in to comment.