-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
61 lines (57 loc) · 1.98 KB
/
project-automation.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "Automation: Update GH Project"
on:
pull_request:
types:
- closed
- opened
- reopened
- ready_for_review
jobs:
# When a PR is a draft, it should go into "In Progress"
mark_as_in_progress:
if: |
(github.event.action == 'opened' || github.event.action == 'reopened')
&& github.event.pull_request.draft == true
runs-on: ubuntu-latest
steps:
- name: Update status to in_progress
id: update_status
uses: peter-evans/create-or-update-project-card@v3
with:
token: ${{ secrets.GH_PROJECT_AUTOMATION }}
project-location: getsentry
project-number: 31
column-name: "🏗 In Progress"
issue-number: ${{ github.event.number }}
# When a PR is not a draft, it should go into "In Review"
mark_as_in_review:
if: |
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
&& github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Update status to in_review
id: update_status
uses: peter-evans/create-or-update-project-card@v3
with:
token: ${{ secrets.GH_PROJECT_AUTOMATION }}
project-location: getsentry
project-number: 31
column-name: "👀 In Review"
issue-number: ${{ github.event.number }}
# By default, closed PRs go into "Ready for Release"
# But if they are closed without merging, they should go into "Done"
mark_as_done:
if: |
github.event.action == 'closed' && github.event.pull_request.merged == false
runs-on: ubuntu-latest
steps:
- name: Update status to done
id: update_status
uses: peter-evans/create-or-update-project-card@v3
with:
token: ${{ secrets.GH_PROJECT_AUTOMATION }}
project-location: getsentry
project-number: 31
column-name: "✅ Done"
issue-number: ${{ github.event.number }}