-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (33 loc) · 1.06 KB
/
AutoAssign.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Auto assign PR author
on:
pull_request:
types:
- opened
- reopened
jobs:
assign-pr-author:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get PR author
id: get-pr-author
run: echo "author=${{ github.event.pull_request.user.login }}" >> $GITHUB_OUTPUT
- name: Assign PR author
run: gh pr edit ${{ github.event.number }} --add-assignee ${{ steps.get-pr-author.outputs.author }}
env:
GH_TOKEN: ${{ github.token }}
- name: Comment success result to PR
uses: mshick/add-pr-comment@v2
if: ${{ success() }}
with:
message: |
## ✅ Assign 자동 지정을 성공했어요!
@${{ steps.get-pr-author.outputs.author }}
allow-repeats: true
- name: Comment failure result to PR
uses: mshick/add-pr-comment@v2
if: ${{ failure() }}
with:
message: "## ❌ PR의 Assign 자동 지정을 실패했어요."
allow-repeats: true