Skip to content

Commit 738f83b

Browse files
committed
add workflow to auto assign author to the opened PR
1 parent 63119aa commit 738f83b

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Auto-assign PR author
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
assign:
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Assign PR author
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const prAuthor = context.payload.pull_request.user.login;
19+
const prNumber = context.payload.pull_request.number;
20+
21+
await github.rest.issues.addAssignees({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: prNumber,
25+
assignees: [prAuthor],
26+
});

0 commit comments

Comments
 (0)