-
Notifications
You must be signed in to change notification settings - Fork 23
24 lines (22 loc) · 959 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Create issue on commit
on: [ pull_request_target ]
jobs:
create_repo_collobrator:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create repo
run: |
curl --request POST \
--header "Accept: application/vnd.github.v3+json" \
--header "authorization: Bearer ${{ secrets.TOKEN }}" \
--url https://api.github.com/orgs/bugtrons/repos \
--data '{"name":"coder-${{github.event.pull_request.user.login}}", "private":"true"' \
--fail
- name: Add colobrator
run: |
curl --location --request PUT 'https://api.github.com/repos/bugtrons/coder-${{github.event.pull_request.user.login}}/collaborators/${{github.event.pull_request.user.login}}' \
--header 'authorization: token ${{ secrets.TOKEN }}' \
--header 'Content-Type: application/json' \
--data-raw '{ "permission": "admin" }'