File tree Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Expand file tree Collapse file tree 1 file changed +18
-17
lines changed Original file line number Diff line number Diff line change 1- name : Process Access Requests
1+ name : Send GitHub Collaborator Invite from Issue
22
33on :
44 issues :
5- types :
6- - closed
5+ types : [closed]
76
87jobs :
9- invite-user :
8+ send-invite :
9+
1010 if : contains(github.event.issue.labels.*.name, 'access-request')
1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - name : Invite User to Private Repo
15- env :
16- TOKEN : ${{ secrets.GITHUB_TOKEN }}
17- USERNAME : ${{ github.event.issue.user.login }}
18- run : |
19- curl -X PUT \
20- -H "Authorization: token $TOKEN" \
21- -H "Accept: application/vnd.github.v3+json" \
22- https://api.github.com/repos/recodehive/Opensource-practice/collaborators/${USERNAME} \
23- -d '{"permission": "pull"}'
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+
17+ - name : Set up Node.js
18+ uses : actions/setup-node@v3
19+ with :
20+ node-version : 16
2421
25- - name : Handle Errors
26- if : failure()
27- run : echo "An error occurred while processing the request."
22+ - name : Invite User to Private Repo
23+ env :
24+ TOKEN : ${{ secrets.GH_TOKEN }}
25+ USERNAME : ${{ github.event.issue.user.login }}
26+ run : |
27+ npm install
28+ node scripts/invite.js $USERNAME $TOKEN
You can’t perform that action at this time.
0 commit comments