generated from devynspencer/powershell-template
-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (82 loc) · 3.64 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
name: Add issues to PowerShell Modules project
on:
workflow_dispatch:
issues:
types:
- opened
- reopened
- labeled
jobs:
add-to-project:
name: Add issue [${{ github.event.issue.number }}] ${{ github.event.issue.title }} to project
runs-on: ubuntu-latest
environment: powershell
steps:
- name: Add issue [${{ github.event.issue.number }}] to PowerShell Modules project
if: github.event.issue.state != 'closed'
uses: actions/[email protected]
with:
project-url: https://github.com/users/devynspencer/projects/10 # PowerShell Modules
github-token: ${{ secrets.CLASSIC_TOKEN }}
labeled: >
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 fields for project card ${{ github.event.issue.title }}
if: |
github.event.issue.state != 'closed' ||
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: https://github.com/users/devynspencer/projects/10 # PowerShell Modules
operation: set
fields: Created At,Status
values: ${{ github.event.issue.created_at }},Backlog
github_token: ${{ secrets.CLASSIC_TOKEN }}
- name: Add issue [${{ github.event.issue.number }}] to Workflow Automation project
if: github.event.issue.state != 'closed'
uses: actions/[email protected]
with:
project-url: https://github.com/users/devynspencer/projects/16 # Workflow Automation
github-token: ${{ secrets.CLASSIC_TOKEN }}
labeled: >
item: webhook,
item: custom action,
item: workflow,
item: template
label-operator: OR
- name: Set fields for project card ${{ github.event.issue.title }}
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: https://github.com/users/devynspencer/projects/16 # PowerShell Modules
operation: set
fields: Created At,Status
values: ${{ github.event.issue.created_at }},Backlog
github_token: ${{ secrets.CLASSIC_TOKEN }}