-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (30 loc) · 949 Bytes
/
test.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
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Test
on:
pull_request:
types:
- opened
jobs:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
todraft:
runs-on: ubuntu-latest
steps:
- name: Set PR to draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -X PATCH \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-d '{"draft": true}' \
$(jq -r '.pull_request.url' <$GITHUB_EVENT_PATH)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
reqtest:
runs-on: ubuntu-latest
steps:
- name: test draft
if: github.event.pull_request.draft == 'false'
run: echo "The draft"
- name: test fair
if: github.event.pull_request.draft == 'true'
run: echo "The fair"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #