-
-
Notifications
You must be signed in to change notification settings - Fork 347
28 lines (26 loc) · 998 Bytes
/
draft-status.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
25
26
27
28
name: Draft Status
permissions: write-all
on:
pull_request_target:
jobs:
set_status:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Get PR source repository URL
run:
echo "${{ github.event.pull_request.head.repo.html_url }}/commits/${{github.event.pull_request.head.ref}}"
- name: Create status
run: |
curl --request POST \
--url ${{ github.event.pull_request.statuses_url }} \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' \
--data '{
"state": "pending",
"context": "Link to Fork Repo Actions",
"target_url": "${{ github.event.pull_request.head.repo.html_url }}/commits/${{github.event.pull_request.head.ref}}",
"description": "use fork github actions until ready for review",
}' \
--fail-with-body