Skip to content

Commit 4415eae

Browse files
committed
ci: Add workflow to auto-assign author on issues and PRs.
1 parent 654b486 commit 4415eae

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 👤 Auto Assign Author
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
pull_request_target:
7+
types: [opened]
8+
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
assign-author:
15+
runs-on: ubuntu-latest
16+
if: github.actor != 'dependabot[bot]'
17+
steps:
18+
- name: Assign author
19+
env:
20+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
22+
REPO: ${{ github.repository }}
23+
ACTOR: ${{ github.actor }}
24+
run: gh api repos/$REPO/issues/$NUMBER/assignees -f "assignees[]=$ACTOR"

0 commit comments

Comments
 (0)