-
Notifications
You must be signed in to change notification settings - Fork 55
97 lines (90 loc) · 3.22 KB
/
kanban.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
# Manage issues in a project board using https://github.com/leonsteinhaeuser/project-beta-automations
---
name: Kanban
on:
pull_request_target:
issues:
types:
- labeled
- reopened
- assigned
- closed
env:
free_to_take: Free to take
in_progress: In Progress
needs_review: Needs review
done: Done
jobs:
# only prio-list labeled items should be added to the board
add-to-project-board:
if: github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'prio-list') && contains(fromJson('["labeled", "reopened"]'), github.event.action)
runs-on: ubuntu-latest
steps:
- name: Add issue to Free-to-take list
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.free_to_take }} # Target status
move-to-inprogress:
if: github.event_name == 'issues' && github.event.action == 'assigned'
runs-on: ubuntu-latest
steps:
- name: Move an issue to the In Progress column
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.in_progress }} # Target status
find-linked-issues:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
name: Find issues linked to a PR
outputs:
linked-issues: ${{ steps.linked-issues.outputs.issues }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get Linked Issues Action
uses: kin/gh-action-get-linked-issues@v1.0
id: linked-issues
with:
access-token: ${{ secrets.RELEASE_TOKEN }}
move-to-needs-review:
if: github.event_name == 'pull_request_target' && contains(fromJson(needs.find-linked-issues.outputs.linked-issues).*.issue.state, 'open')
runs-on: ubuntu-latest
name: Move linked issues to Needs Review
needs: find-linked-issues
strategy:
max-parallel: 3
matrix:
issues: ${{ fromJSON(needs.find-linked-issues.outputs.linked-issues) }}
steps:
- name: Move to Needs Review
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ matrix.issues.issue.node_id }}
operation_mode: status
status_value: ${{ env.needs_review }} # Target status
move-to-done:
if: github.event_name == 'issues' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Move an issue to the Done column
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
with:
gh_token: ${{ secrets.RELEASE_TOKEN }}
organization: pulp
project_id: 8
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: status
status_value: ${{ env.done }} # Target status