Skip to content

Commit adc5fb7

Browse files
committed
ci: Add some additional GH project automation
1 parent a8e5f59 commit adc5fb7

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "Automation: Update GH Project"
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
- opened
7+
- reopened
8+
- ready_for_review
9+
10+
jobs:
11+
# When a PR is a draft, it should go into "In Progress"
12+
mark_as_in_progress:
13+
if: |
14+
(github.event.action == 'opened' || github.event.action == 'reopened')
15+
&& github.event.pull_request.draft == true
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Update status to in_progress
19+
id: update_status
20+
uses: peter-evans/create-or-update-project-card@v3
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
project-location: getsentry
24+
project-number: 31
25+
column-name: "🏗 In Progress"
26+
issue-number: ${{ github.event.number }}
27+
28+
# When a PR is not a draft, it should go into "In Review"
29+
mark_as_in_review:
30+
if: |
31+
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review')
32+
&& github.event.pull_request.draft == false
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Update status to in_review
36+
id: update_status
37+
uses: peter-evans/create-or-update-project-card@v3
38+
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
40+
project-location: getsentry
41+
project-number: 31
42+
column-name: "👀 In Review"
43+
issue-number: ${{ github.event.number }}
44+
45+
46+
# By default, closed PRs go into "Ready for Release"
47+
# But if they are closed without merging, they should go into "Done"
48+
mark_as_done:
49+
if: |
50+
github.event.action == 'closed' && github.event.pull_request.merged == false
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Update status to done
54+
id: update_status
55+
uses: peter-evans/create-or-update-project-card@v3
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
project-location: getsentry
59+
project-number: 31
60+
column-name: "✅ Done"
61+
issue-number: ${{ github.event.number }}

0 commit comments

Comments
 (0)