-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (71 loc) · 2.51 KB
/
project-automations.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
name: Project automations
on:
issues:
types:
- opened
- reopened
- closed
pull_request:
types:
- opened
- reopened
- review_requested
- closed
# map fields with customized labels
env:
ready: 🔖 Ready
code_review: 👀 In review
done: ✅ Done
jobs:
issue_opened_or_reopened:
name: issue_opened_or_reopened
runs-on: ubuntu-latest
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened')
steps:
- name: Move issue to ${{ env.ready }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.WRITE_PROJECT_TOKEN }}
organization: 42Statistics
project_id: 3
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ env.ready }} # Target status
issue_closed:
name: issue_closed
runs-on: ubuntu-latest
if: github.event_name == 'issues' && github.event.action == 'closed'
steps:
- name: Moved issue to ${{ env.done }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.WRITE_PROJECT_TOKEN }}
organization: 42Statistics
project_id: 3
resource_node_id: ${{ github.event.issue.node_id }}
status_value: ${{ env.done }} # Target status
pr_opened_or_reopened_or_reviewrequested:
name: pr_opened_or_reopened_or_reviewrequested
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'review_requested')
steps:
- name: Move PR to ${{ env.code_review }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.WRITE_PROJECT_TOKEN }}
organization: 42Statistics
project_id: 3
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.code_review }} # Target status
pr_closed:
name: pr_closed
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed'
steps:
- name: Move PR to ${{ env.done }}
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.WRITE_PROJECT_TOKEN }}
organization: 42Statistics
project_id: 3
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: ${{ env.done }} # Target status