-
Notifications
You must be signed in to change notification settings - Fork 8
156 lines (136 loc) · 6.53 KB
/
update-project-on-pr-label.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Update project on PR label change
on:
pull_request_target:
types: [opened, labeled]
jobs:
update_project_on_pr_label_change:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
cd .github/actions/project_update/
pip install -r requirements.txt
- name: Update Triage PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: triage') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Triage
- name: Update Draft PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: draft') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Draft
- name: Update Blocked PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: blocked') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Blocked
- name: Update Waiting PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: waiting') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Waiting
- name: Update Ready PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: ready') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Ready
- name: Update Started PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: started') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Started
- name: Update Review PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: review') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Review
- name: Update Done PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'status: done') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Done
- name: Update Future PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'priority: future') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --status Draft
- name: Update Urgent PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'priority: urgent') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --priority Urgent
- name: Update documentation PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: documentation') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Documentation
- name: Update infrastructure PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: infrastructure') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Infrastructure
- name: Update product PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: product') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Product
- name: Update design PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: design') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Design
- name: Update frontend PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: frontend') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Frontend
- name: Update backend PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: backend') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Backend
- name: Update database PRs
if: "${{ contains(github.event.pull_request.labels.*.name, 'work: database') }}"
env:
MATHESAR_ORG_GITHUB_TOKEN: ${{secrets.MATHESAR_ORG_GITHUB_TOKEN}}
run: |
cd .github/actions/project_update/
python project_update.py ${{ github.event.pull_request.node_id }} --work Backend