File tree 1 file changed +20
-13
lines changed
1 file changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
1
name : ' [CI] PR Assignee 자동 지정'
2
2
3
+ permissions :
4
+ issues : write
5
+ pull-requests : write
6
+
3
7
on :
4
8
pull_request :
5
- types : [opened, synchronize ]
9
+ types : [opened, reopened ]
6
10
7
11
jobs :
8
- assign-pr :
9
- runs-on : ubuntu-latest
10
- steps :
11
- - name : Checkout repository
12
- uses : actions/checkout@v3
13
-
14
- - name : Assign PR creator as assignee
15
- uses : actions-ecosystem/action-add-assignees@v1
16
- with :
17
- assignees : ${{ github.actor }}
18
- github_token : ${{ secrets.TOKEN }}
19
-
12
+ assign-pr :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Assign PR to the author
17
+ uses : actions/github-script@v6
18
+ with :
19
+ script : |
20
+ const prAuthor = context.payload.pull_request.user.login;
21
+ github.rest.issues.addAssignees({
22
+ owner: context.repo.owner,
23
+ repo: context.repo.repo,
24
+ issue_number: context.payload.pull_request.number,
25
+ assignees: [prAuthor]
26
+ })
You can’t perform that action at this time.
0 commit comments