-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
89 lines (87 loc) · 2.79 KB
/
action.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
name: "Project Board Automation"
description: "Automate GitHub Projects with ease"
inputs:
organization:
description: GitHub organization
required: false
project:
description: Project board number
required: true
default: "1"
token:
description: GitHub Token with org:write
required: true
todoLabel:
description: Initial label for new issues/PRs
required: false
default: "needs triage"
statusName:
description: Name of the 'status' field on the project board
required: false
default: status
prStatusValue:
description: Name of the 'todo' status on the project board
required: false
default: todo
issueStatusValue:
description: Name of the 'todo' status on the project board
required: false
default: todo
includeEffort:
description: if true, set effort
required: false
default: 'true'
effortName:
description: Name of the 'effort' field on the project board
required: false
default: effort
effortMapping:
description: |
JSON string with map where:
- string key is a valid 'effort' field value
- number value is maximum duration in days
for example: [{"pattern": "two days", "value": 2},{"pattern": "the longest one", "value": 1e1000}]
required: false
default: '[{"pattern": "two days", "value": 2},{"pattern": "the longest one", "value": 1e1000}]'
monthlyMilestoneName:
description: Name of the 'monthly milestone' field on the project board
required: false
default: monthly milestone
quarterlyMilestoneName:
description: Name of the 'quarterly milestone' field on the project board
required: false
default: quarterly milestone
runs:
using: "composite"
steps:
- name: Initial labeling
if: ${{ ! env.ACT_TEST }}
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "${{ inputs.todoLabel }}"
ignore-if-assigned: true
ignore-if-labeled: true
- name: Fetch project data
uses: actions/github-script@v7
if: ${{ github.actor != 'dependabot[bot]' }}
id: runscript
with:
github-token: ${{ inputs.token }}
script: |
const script = require('${{ github.action_path }}/action.js')
await script(
github,
context,
core,
`${{ inputs.organization }}`,
${{ inputs.project }},
`${{ inputs.statusName }}`,
`${{ inputs.prStatusValue }}`,
`${{ inputs.issueStatusValue }}`,
${{ inputs.includeEffort }},
`${{ inputs.effortName }}`,
`${{ inputs.effortMapping }}`,
`${{ inputs.monthlyMilestoneName }}`,
`${{ inputs.quarterlyMilestoneName }}`,
`${{ github.action_path }}`
)