Skip to content

[Access Request] Request access for space-coder-ai #6

[Access Request] Request access for space-coder-ai

[Access Request] Request access for space-coder-ai #6

name: Process Access Requests
on:
issues:
types:
- closed
jobs:
invite-user:
if: contains(github.event.issue.labels.*.name, 'access-request')
runs-on: ubuntu-latest
steps:
- name: Invite User to Private Repo
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
USERNAME: ${{ github.event.issue.user.login }}
run: |
curl -X PUT \
-H "Authorization: token $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/recodehive/Opensource-practice/collaborators/${USERNAME} \
-d '{"permission": "pull"}'
- name: Handle Errors
if: failure()
run: echo "An error occurred while processing the request."