-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathmetadata.yml
606 lines (496 loc) · 17.1 KB
/
metadata.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
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
name: 🧱 Core
category: core
description: Global configuration and options
supports:
- user
- organization
- repository
scopes: []
inputs:
token:
description: |
GitHub Personal Access Token
No scopes are required by default, though some plugins and features may require additional scopes.
When using a configuration which does not requires a GitHub PAT, it is possible to pass `NOT_NEEDED` instead.
When doing so, any settings which defaults on user fetched values will not be templated (e.g. `.user.*`) and will usually need to be set manually.
type: token
required: true
user:
description: |
GitHub username
Defaults to [`token`](/source/plugins/core/README.md#token) owner username.
type: string
default: ""
preset: no
repo:
description: |
GitHub repository
This option is only revelant for repositories templates
type: string
default: ""
preset: no
committer_token:
description: |
GitHub Token used to commit metrics
Leave this to `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}`, which is a special auto-generated token restricted to current repository scope.
> 💡 When using [`output_action: gist`](/source/plugins/core/README.md#output_action), it will use [`token`](/source/plugins/core/README.md#token) instead, since gists are outside of scope
type: token
default: ${{ github.token }}
committer_branch:
description: |
Target branch
Defaults to current repository default branch
type: string
default: ""
committer_message:
description: |
Commit message
Use `${filename}` to display filename
type: string
default: Update ${filename} - [Skip GitHub Action]
committer_gist:
description: |
Gist id
Specify an existing gist id (can be retrieved from its URL) when using [`output_action: gist`](/source/plugins/core/README.md#output_action).
type: string
default: ""
preset: no
filename:
description: |
Output path
When using an asterisk (`*`), correct extension will automatically be applied according to [`config_output`](/source/plugins/core/README.md#config_output) value
type: string
default: github-metrics.*
markdown:
description: |
Markdown template path
It can be either a local path or a full link (e.g. https://raw.githubusercontent.com)
type: string
default: TEMPLATE.md
markdown_cache:
description: |
Markdown file cache
type: string
default: .cache
output_action:
description: |
Output action
- `none`: just create file in `/metrics_renders` directory of action runner
- `commit`: push output to `committer_branch`
- `pull-request`: push output to a new branch and open a pull request to `committer_branch`
- `pull-request-merge`: same as `pull-request` and additionally merge pull request
- `pull-request-squash`: same as `pull-request` and additionally squash and merge pull request
- `pull-request-rebase`: same as `pull-request` and additionally rebase and merge pull request
- `gist`: push output to `committer_gist`
> 💡 When using `pull-request`, you will need to set the last job with a `pull-request-*` action instead, else it won't be merged
> ⚠️ As GitHub gists API does not support binary files upload, `gist` does not support [`config_output`](/source/plugins/core/README.md#config_output) set to either `png`, `jpeg` or `markdown-pdf`
type: string
default: commit
values:
- none
- commit
- pull-request
- pull-request-merge
- pull-request-squash
- pull-request-rebase
- gist
output_condition:
description: |
Output condition
- `always`: always try to push changes
- `data-changed`: skip changes if no data changed (e.g. like when only metadata changed)
> ℹ️ This option is only revelant when [`config_output: svg`](/source/plugins/core/README.md#config_output) is set
type: string
default: always
values:
- always
- data-changed
optimize:
description: |
Optimization features
- `css`: purge and minify CSS styles
- `xml`: pretty-print XML (useful to reduce diff)
- `svg`: optimization with SVGO (experimental, requires [`experimental_features: --optimize-svg`](/source/plugins/core/README.md#experimental_features))
Templates may not always honour all provided options
type: array
default: css, xml
format: comma-separated
values:
- css
- xml
- svg
setup_community_templates:
description: |
Community templates to setup
See [community templates guide](https://github.com/lowlighter/metrics/blob/master/source/templates/community/README.md) for more informations
type: array
format: comma-separated
default: ""
extras:
- metrics.setup.community.templates
template:
description: |
Template
Community templates must be prefixed by at sign (`@`)
See [list of supported templates](https://github.com/lowlighter/metrics/blob/master/README.md#%EF%B8%8F-templates)
type: string
default: classic
query:
description: |
Query parameters
Pass additional parameters to templates.
This is mostly useful for custom templates.
> ⚠️ **Do not** use this option to pass other existing parameters, they will be overwritten
type: json
default: "{}"
extras_css:
description: |
Extra CSS
Custom CSS that will be injected in used template.
Useful to avoid creating a new template just to tweak some styling
> 💡 *metrics* tends to avoid using `!important` rules, which means that most styling can be overridden by this option when using `!important`
type: string
default: ""
extras:
- metrics.run.puppeteer.user.css
extras_js:
description: |
Extra JavaScript
Custom JavaScript that will be executed during puppeteer rendering.
Useful to avoid creating a new template just to tweak some content.
> ⚠️ Note that is it executed within puppeteer context and **not** within *metrics* context.
> No access to fetched data or configuration will be offered through this context.
> It is run after transformations and optimizations, but just before resizing.
type: string
default: ""
extras:
- metrics.run.puppeteer.user.js
github_api_rest:
description: |
GitHub REST API endpoint
Can be used to support [GitHub enterprises server](https://github.com/enterprise).
Leave empty to use default endpoint.
type: string
default: ""
example: https://api.github.com
global: yes
github_api_graphql:
description: |
GitHub GraphQL API endpoint
Can be used to support [GitHub enterprises server](https://github.com/enterprise).
Leave empty to use default endpoint.
> ℹ️ GraphQL octokit will automatically append `/graphql` to provided endpoint
type: string
default: ""
example: https://api.github.com
global: yes
config_timezone:
description: |
Timezone for dates
See [list of supported timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
type: string
default: ""
global: yes
config_order:
description: |
Plugin order
By default, templates use `partials/_.json` ordering.
You can override the content order by using this setting.
If some partials are omitted, they will be appended at the end with default ordering
type: array
format: comma-separated
default: ""
example: base.header, base.repositories
global: yes
config_twemoji:
description: |
Use twemojis
Replace emojis by [twemojis]([twemojis](https://github.com/twitter/twemoji)) to have a consistent render across all platforms
May increase filesize.
type: boolean
default: no
global: yes
config_gemoji:
description: |
Use GitHub custom emojis
GitHub supports additional emojis which are not registered in Unicode standard (:octocat:, :shipit:, :trollface:, ...)
See full list at https://api.github.com/emojis.
This option has no effect when [`token: NOT_NEEDED``](/source/plugins/core/README.md#token) is set.
May increase filesize
type: boolean
default: yes
global: yes
config_octicon:
description: |
Use GitHub octicons
Octicons are open-sourced icons provided by GitHub.
See full list at https://primer.style/octicons.
To include an octicon, use the following syntax: `:octicon-{name}-{size}:`.
Size must be a supported icon size (12, 16 or 24).
16px octicons can omit size and directly use `:octicon-{name}:` syntax.
May increase filesize
type: boolean
default: no
global: yes
config_display:
description: |
Display width (for image output formats)
- `regular`: 480px width
- `large`: 960px width (may not be supported by all templates)
- `columns`: Full width with auto-sizing (two columns for desktops, and one column for mobile)
- known issue: https://github.com/lowlighter/metrics/issues/374
type: string
default: regular
values:
- regular
- large
- columns
global: yes
config_animations:
description: |
Use CSS animations
type: boolean
default: yes
global: yes
config_base64:
description: |
Base64-encoded images
Enable this option to make self-contained output (i.e. with no external links)
type: boolean
default: yes
global: yes
config_padding:
description: |
Output padding
Although *metrics* try to auto-guess resulting height, rendering is still dependent on OS and browser settings.
It can result in cropped or oversized outputs.
This settings let you manually adjust padding with the following format:
- 1 value for both width and height
- 2 values for width fist and height second, separated by a comma (`,`)
Each value need to respect the following format:
- `{number}`
- `{number} + {number}%`
- `{number}%`
Percentage are relative to computed dimensions
type: string
default: 0, 8 + 11%
config_output:
description: |
Output format
- `auto`: Template default (usually `svg` or `markdown`)
- `svg`: SVG image
- `png`: PNG image (animations not supported)
- `jpeg`: JPEG image (animations and transparency not supported)
- `json`: JSON data dump
- `markdown`: Markdown rendered file
- `markdown-pdf`: PDF from markdown rendered file
- `insights`: Metrics Insights self-contained HTML file (not configurable)
type: string
default: auto
values:
- auto
- svg
- png
- jpeg
- json
- markdown
- markdown-pdf
- insights
config_presets:
description: |
Configuration presets
type: array
format: comma-separated
default: ""
preset: no
example: "@lunar-red"
extras:
- metrics.setup.community.presets
retries:
description: |
Retries in case of failures (for rendering)
type: number
default: 3
min: 1
max: 10
retries_delay:
description: |
Delay between each retry (in seconds, for rendering)
type: number
default: 300
min: 0
max: 3600
retries_output_action:
description: |
Retries in case of failures (for output action)
type: number
default: 5
min: 1
max: 10
retries_delay_output_action:
description: |
Delay between each retry (in seconds, for output action)
type: number
default: 120
min: 0
max: 3600
clean_workflows:
description: |
Clean previous workflows jobs
This can be used to clean up Action tabs from previous workflows runs.
Use `all` to clean up workflows runs in any state.
> ⚠️ When reporting issues, it is **required** to provide logs so it can be investigated and reproduced.
> Be sure to disable this option when asking for help or submitting bug reports.
type: array
format: comma-separated
default: ""
preset: no
example: ""
values:
- cancelled
- failure
- success
- skipped
- startup_failure
- timed_out
- all
delay:
description: |
Job delay
This can be used to avoid triggering GitHub abuse mechanics on large workflows
type: number
default: 0
min: 0
max: 3600
quota_required_rest:
description: |
Minimum GitHub REST API requests quota required to run
Action will cancel itself without any errors if requirements are not met
This option has no effect when [`token: NOT_NEEDED`](/source/plugins/core/README.md#token) is set
type: number
default: 200
min: 0
max: 5000
quota_required_graphql:
description: |
Minimum GitHub GraphQL API requests quota required to run
Action will cancel itself without any errors if requirements are not met
This option has no effect when [`token: NOT_NEEDED`](/source/plugins/core/README.md#token) is set
type: number
default: 200
min: 0
max: 5000
quota_required_search:
description: |
Minimum GitHub Search API requests quota required to run
Action will cancel itself without any errors if requirements are not met
This option has no effect when [`token: NOT_NEEDED`](/source/plugins/core/README.md#token) is set
type: number
default: 0
min: 0
max: 30
notice_releases:
description: |
Notice about new releases of metrics
type: boolean
default: yes
# ====================================================================================
# 🚧 Options below are mostly used for testing
use_prebuilt_image:
description: |
Use pre-built docker image from [GitHub container registry](https://github.com/lowlighter/metrics/pkgs/container/metrics)
It allows to save build time and make job significantly faster, and there is almost no reason to disable this settings.
This option has no effects on forks (images will always be rebuilt from Dockerfile)
type: boolean
default: yes
testing: yes
preset: no
plugins_errors_fatal:
description: |
Fatal plugin errors
When enabled, the job will fail in case of plugin errors, else it will be handled gracefully in output with an error message
type: boolean
default: no
testing: yes
preset: no
debug:
description: |
Debug mode
This setting is automatically enable if a job fail (useful with [`plugins_errors_fatal: yes`](/source/plugins/core/README.md#plugins_errors_fatal))
type: boolean
default: no
testing: yes
preset: no
verify:
description: |
SVG validity check
type: boolean
default: no
testing: yes
preset: no
extras:
- metrics.npm.optional.libxml2
debug_flags:
description: |
Debug flags
- `--cakeday`: simulate registration anniversary
- `--halloween`: enable halloween colors *(only first color scheme will be applied if multiple are specified)*
- `--winter`: enable winter colors *(only first color scheme will be applied if multiple are specified)*
- `--error`: force render error
- `--puppeteer-debug`: enable puppeteer debug mode\*
- `--puppeteer-disable-headless`: disable puppeteer headless mode *(requires a graphical environment)*\*
- `--puppeteer-wait-load`: override puppeteer wait events\*
- `--puppeteer-wait-domcontentloaded`: override puppeteer wait events\*
- `--puppeteer-wait-networkidle0`: override puppeteer wait events\*
- `--puppeteer-wait-networkidle2`: override puppeteer wait events\*
> *\* 🌐 Web instances needs to have [`debug`](/source/plugins/core/README.md#debug) set in `settings.json` for these flags to be supported.*
> ⚠️ No backward compatibility is guaranteed for these features, they are only meant for debugging purposes.
type: array
format: space-separated
default: ""
values:
- --cakeday
- --halloween
- --winter
- --error
- --puppeteer-debug
- --puppeteer-disable-headless
- --puppeteer-wait-load
- --puppeteer-wait-domcontentloaded
- --puppeteer-wait-networkidle0
- --puppeteer-wait-networkidle2
testing: yes
preset: no
debug_print:
description: |
Print output in console
type: boolean
default: no
testing: yes
preset: no
dryrun:
description: |
Dry-run
> ⚠️ Unlike [`output_action: none`](/source/plugins/core/README.md#output_action), output file won't be available in `/metrics_renders` directory
type: boolean
default: no
testing: yes
preset: no
experimental_features:
description: |
Experimental features
> ⚠️ No backward compatibility is guaranteed for these features
type: array
format: space-separated
default: ""
values:
- --optimize-svg
testing: yes
preset: no
use_mocked_data:
description: |
Use mocked data instead of live APIs
type: boolean
default: no
testing: yes
preset: no