File tree Expand file tree Collapse file tree 4 files changed +115
-4
lines changed
src/steps/writing/creation/dotGitHub Expand file tree Collapse file tree 4 files changed +115
-4
lines changed Original file line number Diff line number Diff line change 1+ jobs :
2+ accessibility_alt_text_bot :
3+ runs-on : ubuntu-latest
4+ steps :
5+ - if : ${{ github.event.issue || github.event.pull_request }}
6+ uses : github/accessibility-alt-text-bot@v1.4.0
7+
8+ name : Accessibility Alt Text Bot
9+
10+ on :
11+ issue :
12+ types :
13+ - created
14+ - edited
15+ issue_comment :
16+ types :
17+ - created
18+ - edited
19+ pull_request :
20+ types :
21+ - created
22+ - edited
23+
24+ permissions :
25+ issues : write
26+ pull-requests : write
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ interface WorkflowFileConcurrency {
66}
77
88interface WorkflowFileOn {
9+ issue ?: {
10+ types ?: string [ ] ;
11+ } ;
12+ issue_comment ?: {
13+ types ?: string [ ] ;
14+ } ;
915pull_request ?:
1016| {
1117branches ?: string | string [ ] ;
@@ -28,6 +34,7 @@ interface WorkflowFileOn {
2834interface WorkflowFilePermissions {
2935contents ?: string ;
3036"id-token" ?: string ;
37+ issues ?: string ;
3138"pull-requests" ?: string ;
3239}
3340
Original file line number Diff line number Diff line change @@ -41,6 +41,33 @@ describe("createWorkflows", () => {
4141
4242expect ( workflows ) . toMatchInlineSnapshot ( `
4343{
44+ "accessibility-alt-text-bot.yml": "jobs:
45+ accessibility_alt_text_bot:
46+ runs-on: ubuntu-latest
47+ steps:
48+ - if: \${{ github.event.issue || github.event.pull_request }}
49+ uses: github/accessibility-alt-text-bot@v1.4.0
50+
51+ name: Accessibility Alt Text Bot
52+
53+ on:
54+ issue:
55+ types:
56+ - created
57+ - edited
58+ issue_comment:
59+ types:
60+ - created
61+ - edited
62+ pull_request:
63+ types:
64+ - created
65+ - edited
66+
67+ permissions:
68+ issues: write
69+ pull-requests: write
70+ ",
4471 "build.yml": "jobs:
4572 build:
4673 runs-on: ubuntu-latest
@@ -218,10 +245,10 @@ describe("createWorkflows", () => {
218245 :tada: This is included in version {release_link} :tada:
219246
220247 The release is available on:
221-
248+
222249 * [GitHub releases](https://github.com/StubOwner/stub-repository/releases/tag/{release_tag})
223250 * [npm package (@latest dist-tag)](https://www.npmjs.com/package/stub-repository/v/\${{ env.npm_version }})
224-
251+
225252 Cheers! 📦🚀
226253
227254name: Post Release
@@ -341,6 +368,33 @@ describe("createWorkflows", () => {
341368
342369expect ( workflows ) . toMatchInlineSnapshot ( `
343370{
371+ "accessibility-alt-text-bot.yml": "jobs:
372+ accessibility_alt_text_bot:
373+ runs-on: ubuntu-latest
374+ steps:
375+ - if: \${{ github.event.issue || github.event.pull_request }}
376+ uses: github/accessibility-alt-text-bot@v1.4.0
377+
378+ name: Accessibility Alt Text Bot
379+
380+ on:
381+ issue:
382+ types:
383+ - created
384+ - edited
385+ issue_comment:
386+ types:
387+ - created
388+ - edited
389+ pull_request:
390+ types:
391+ - created
392+ - edited
393+
394+ permissions:
395+ issues: write
396+ pull-requests: write
397+ ",
344398 "build.yml": "jobs:
345399 build:
346400 runs-on: ubuntu-latest
Original file line number Diff line number Diff line change @@ -89,6 +89,30 @@ export function createWorkflows(options: Options) {
8989] ,
9090} ) ,
9191} ) ,
92+ "accessibility-alt-text-bot.yml" : createWorkflowFile ( {
93+ name : "Accessibility Alt Text Bot" ,
94+ on : {
95+ issue : {
96+ types : [ "created" , "edited" ] ,
97+ } ,
98+ issue_comment : {
99+ types : [ "created" , "edited" ] ,
100+ } ,
101+ pull_request : {
102+ types : [ "created" , "edited" ] ,
103+ } ,
104+ } ,
105+ permissions : {
106+ issues : "write" ,
107+ "pull-requests" : "write" ,
108+ } ,
109+ steps : [
110+ {
111+ if : "${{ github.event.issue || github.event.pull_request }}" ,
112+ uses : "github/accessibility-alt-text-bot@v1.4.0" ,
113+ } ,
114+ ] ,
115+ } ) ,
92116"lint.yml" : createWorkflowFile ( {
93117name : "Lint" ,
94118runs : [ "pnpm build || true" , "pnpm lint" ] ,
@@ -144,10 +168,10 @@ export function createWorkflows(options: Options) {
144168:tada: This is included in version {release_link} :tada:
145169
146170The release is available on:
147-
171+
148172* [GitHub releases](https://github.com/${ options . owner } /${ options . repository } /releases/tag/{release_tag})
149173* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${ options . repository } /v/\${{ env.npm_version }})
150-
174+
151175Cheers! 📦🚀
152176` ,
153177} ,
You can’t perform that action at this time.
0 commit comments