-
Notifications
You must be signed in to change notification settings - Fork 97
66 lines (63 loc) · 2.45 KB
/
workflow.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
# This workflow will automatically move cards in the project
# board to reflect that status of a PR.
name: Move PR cards on project board
on:
pull_request:
types:
- opened
- closed
- labeled
- unlabeled
- converted_to_draft
- ready_for_review
- review_requested
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PROJECT_URL: https://github.com/patternfly/patternfly-elements/projects/5
jobs:
project_board:
name: Move cards in the project board according to label
runs-on: ubuntu-latest
if: contains(github.event.*.state, 'open')
steps:
- name: Assign new issues to project board
uses: takanabe/[email protected]
if: |
github.event.action == 'opened' ||
github.event.action == 'converted_to_draft' ||
contains(github.event.*.labels.*.name, 'work in progress')
env:
GITHUB_PROJECT_COLUMN_NAME: In progress
- name: Move to testing
uses: takanabe/[email protected]
if: |
github.event.action == 'ready_for_review' ||
contains(github.event.*.labels.*.name, 'ready: browser testing') ||
contains(github.event.*.labels.*.name, 'ready: branch testing')
env:
GITHUB_PROJECT_COLUMN_NAME: "Ready: branch & browser testing"
- name: Ready for code review
uses: takanabe/[email protected]
if: |
github.event.action == 'review_requested' ||
contains(github.event.*.labels.*.name, 'ready: code review') ||
contains(github.event.*.labels.*.name, 'ready: design review')
env:
GITHUB_PROJECT_COLUMN_NAME: "Ready: code & design review"
- name: Ready to merge
uses: takanabe/[email protected]
if: |
(
github.event.review.state == 'approved' &&
!contains(github.event.*.labels.*.name, 'ready: design review') &&
!contains(github.event.*.labels.*.name, 'ready: branch testing') &&
!contains(github.event.*.labels.*.name, 'ready: browser testing')
) ||
contains(github.event.*.labels.*.name, 'ready for merge')
env:
GITHUB_PROJECT_COLUMN_NAME: Approved
- name: Completed
uses: takanabe/[email protected]
if: github.event.action == 'closed'
env:
GITHUB_PROJECT_COLUMN_NAME: Done