File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : PR 자동 라벨링 및 담당자 할당
2+
3+ on :
4+ pull_request :
5+ types : [opened, reopened]
6+
7+ jobs :
8+ add-labels-assign :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v2
13+
14+ - name : Add labels and assign PR creator
15+ env :
16+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
17+ run : |
18+ PR_NUMBER=${{ github.event.pull_request.number }}
19+ PR_CREATOR=${{ github.event.pull_request.user.login }}
20+
21+ # Add labels
22+ curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
23+ -H "Accept: application/vnd.github.v3+json" \
24+ https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/labels \
25+ -d '{"labels":["매운맛🔥", "진행 중 🏃"]}'
26+
27+ # Assign PR creator
28+ curl -X POST -H "Authorization: token $GITHUB_TOKEN" \
29+ -H "Accept: application/vnd.github.v3+json" \
30+ https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/assignees \
31+ -d "{\"assignees\":[\"$PR_CREATOR\"]}"
You can’t perform that action at this time.
0 commit comments