Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/request-access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Request Access
about: Submit this form to request read-only access to a private repository.
title: "[Access Request] Request access for {username}"
labels: access-request
assignees: ''

---

## Request Access to Private Repository

Thank you for your interest in accessing our private repository! Please fill out the required details below to submit your request.

### GitHub Username
Please provide your GitHub username. Ensure it's accurate so we can process your request.
27 changes: 27 additions & 0 deletions .github/workflows/private-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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/Job-Seeker/collaborators/${USERNAME} \
-d '{"permission": "pull"}'

- name: Handle Errors
if: failure()
run: echo "An error occurred while processing the request."