-
Notifications
You must be signed in to change notification settings - Fork 11
200 lines (173 loc) · 6.97 KB
/
Copy pathagency-onboarding.yml
File metadata and controls
200 lines (173 loc) · 6.97 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: "Agency Onboarding Issue Scaffold"
on:
workflow_dispatch:
inputs:
long_name:
description: "The full name of the transit provider; e.g. California State Transit"
required: true
type: string
short_name:
description: "The short name / acronym of the transit provider; e.g. CST"
required: true
type: string
transit_processor:
description: "Which transit processor does this transit provider use?"
required: true
type: choice
options:
- Littlepay
- Switchio
website:
description: "The full URL (including https://) to the transit provider's website"
required: false
type: string
launch_date:
description: "Estimated launch date (month and year); e.g. August 2026"
required: false
type: string
initiative_issue:
description: "The number (e.g. 1234) for the parent Initiative issue"
required: false
type: number
permissions:
contents: write
issues: write
pull-requests: write
jobs:
scaffold-issues:
runs-on: ubuntu-latest
env:
helpers_script: "${{ github.workspace }}/.github/workflows/agency-onboarding/helpers.js"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Parent issue
id: parent
uses: actions/github-script@v8
with:
script: |
const { createEpicIssue } = await import(process.env.helpers_script);
const epicIssue = await createEpicIssue({ context, core, github });
core.setOutput('node_id', epicIssue.data.node_id);
core.setOutput('issue_number', epicIssue.data.number);
- name: Onboarding form issue
id: form
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'onboarding-form.md',
title: `Transit provider has completed their onboarding form`
});
- name: Adoption table issue
id: table
uses: actions/github-script@v8
with:
script: |
const { updateAdoptionTable } = await import(process.env.helpers_script);
draftPr = await updateAdoptionTable({
github, context,
parentIssue: "${{ steps.parent.outputs.issue_number }}"
});
core.notice(`Draft PR for updating agency adoption table: ${draftPr.html_url}`);
- name: Transit processor configuration issue
id: transit-processor
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
const { transit_processor } = context.payload.inputs;
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: `${transit_processor.toLowerCase()}.md`,
title: `${transit_processor} configuration complete; ready for configuration in Cal-ITP Benefits`
});
- name: Production Validation configuration issue
id: production-validation
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'production-validation.md',
title: `Transit provider fully configured for Production Validation testing in Cal-ITP Benefits \`test\` environment`
});
- name: Test environment configuration issue
id: test
uses: actions/github-script@v8
if: inputs.transit_processor == 'Littlepay'
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'test.md',
title: `Transit provider fully configured and in Cal-ITP Benefits \`test\` environment`
});
- name: Production environment configuration issue
id: production
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'production.md',
title: `Transit provider fully configured and active in Cal-ITP Benefits \`production\` environment`
});
- name: In-Person Enrollment configuration issue
id: in-person
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'in-person.md',
title: `Transit provider is configured for In-Person Enrollments in Benefits Administrator`
});
- name: Metabase configuration issue
id: metabase-config
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'metabase-config.md',
title: `Add product names to transaction charts in Metabase`
});
- name: Amplitude enrollment issue
id: amplitude-enrollment
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'amplitude.md',
title: `Amplitude displays one or more successful enrollments for this transit provider`
});
- name: Metabase metrics issue
id: metabase-metrics
uses: actions/github-script@v8
with:
script: |
const { createSubIssue } = await import(process.env.helpers_script);
await createSubIssue({
github, context, core,
parentNodeId: "${{ steps.parent.outputs.node_id }}",
templateName: 'metabase-metrics.md',
title: `Metabase metrics display activity for this transit provider`
});