Grant Access to Private Repo #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Grant Access to Private Repo | |
on: | |
watch: | |
types: [started] | |
jobs: | |
check_star_and_grant_access: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add user to private repo | |
run: | | |
curl -X PUT -H "Authorization: token ${{ secrets.GH_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/hamsadev/EmbeddedC-Solutions/collaborators/${{ github.event.sender.login }} \ | |
-d '{"permission":"pull"}' | |
- name: Send confirmation | |
run: echo "Access granted to private repository (EmbeddedC-Solutions) for user ${{ github.event.sender.login }}." |