-
Notifications
You must be signed in to change notification settings - Fork 238
29 lines (25 loc) · 1016 Bytes
/
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
name: Auto Assign and Label Issues
on:
issues:
types: [opened]
jobs:
assign-and-label:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Auto assign issue
run: |
ASSIGNEE='${{ github.actor }}'
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
-d "{\"assignees\":[\"${ASSIGNEE}\"]}"
- name: Auto label issue
run: |
# LABELS='["good first issue", "gssoc", "level1"]'
LABELS='[ "gssoc" ]'
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/labels \
-d "{\"labels\":${LABELS}}"