-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (85 loc) · 3.5 KB
/
add-to-projects.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
name: Add issue to project
on:
workflow_dispatch:
issues:
types:
- opened
- reopened
- labeled
jobs:
add-to-project:
name: Add issue [${{ github.event.issue.number }}] to project
runs-on: ubuntu-latest
steps:
- name: Add issue to project [Web Development]
if: github.event.issue.state != 'closed'
uses: actions/add-to-project@v1.0.2
with:
project-url: ${{ vars.WEB_DEVELOPMENT_PROJECT_URL }}
github-token: ${{ secrets.CLASSIC_TOKEN }}
labeled: >
item: build system,
item: chat bot,
item: documentation,
item: function,
item: module,
item: script,
item: unit test,
item: integration test,
type: bug,
type: enhancement,
type: feature request,
type: question,
type: research
label-operator: OR
- name: Set card fields for project [Web Development]
if: |
github.event.issue.state != 'closed' && (
contains(github.event.issue.labels.*.name, 'item: build system') ||
contains(github.event.issue.labels.*.name, 'item: chat bot') ||
contains(github.event.issue.labels.*.name, 'item: documentation') ||
contains(github.event.issue.labels.*.name, 'item: function') ||
contains(github.event.issue.labels.*.name, 'item: module') ||
contains(github.event.issue.labels.*.name, 'item: script') ||
contains(github.event.issue.labels.*.name, 'item: unit test') ||
contains(github.event.issue.labels.*.name, 'item: integration test') ||
contains(github.event.issue.labels.*.name, 'type: bug') ||
contains(github.event.issue.labels.*.name, 'type: enhancement') ||
contains(github.event.issue.labels.*.name, 'type: feature request') ||
contains(github.event.issue.labels.*.name, 'type: question') ||
contains(github.event.issue.labels.*.name, 'type: research')
)
uses: endbug/project-fields@v2
with:
project_url: ${{ vars.WEB_DEVELOPMENT_PROJECT_URL }}
operation: set
fields: Created At,Status
values: ${{ github.event.issue.created_at }},Backlog
github_token: ${{ secrets.CLASSIC_TOKEN }}
- name: Add issue to project [Workflow Automation]
if: github.event.issue.state != 'closed'
uses: actions/add-to-project@v1.0.2
with:
project-url: ${{ vars.AUTOMATION_PROJECT_URL }} # Workflow Automation
github-token: ${{ secrets.CLASSIC_TOKEN }}
labeled: >
item: webhook,
item: custom action,
item: workflow,
item: template
label-operator: OR
- name: Set card fields for project [Workflow Automation]
if: |
github.event.issue.state != 'closed' && (
contains(github.event.issue.labels.*.name, 'item: webhook') ||
contains(github.event.issue.labels.*.name, 'item: custom action') ||
contains(github.event.issue.labels.*.name, 'item: workflow') ||
contains(github.event.issue.labels.*.name, 'item: template')
)
uses: endbug/project-fields@v2
with:
project_url: ${{ vars.AUTOMATION_PROJECT_URL }} # PowerShell Modules
operation: set
fields: Created At,Status
values: ${{ github.event.issue.created_at }},Backlog
github_token: ${{ secrets.CLASSIC_TOKEN }}