We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2c7042 commit 76af284Copy full SHA for 76af284
.github/workflows/private-access.yml
@@ -0,0 +1,27 @@
1
+name: Process Access Requests
2
+
3
+on:
4
+ issues:
5
+ types:
6
+ - closed
7
8
+jobs:
9
+ invite-user:
10
+ if: contains(github.event.issue.labels.*.name, 'access-request')
11
+ runs-on: ubuntu-latest
12
13
+ 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/REPO-NAME/collaborators/${USERNAME} \
23
+ -d '{"permission": "pull"}'
24
25
+ - name: Handle Errors
26
+ if: failure()
27
+ run: echo "An error occurred while processing the request."
0 commit comments