diff --git a/source/plugins/core/README.md b/source/plugins/core/README.md
index b96d1bb5..b590224a 100644
--- a/source/plugins/core/README.md
+++ b/source/plugins/core/README.md
@@ -1,8 +1,283 @@
-### ๐งฑ Core
+
+
@@ -11,7 +286,9 @@ Metrics also have general options that impact global metrics rendering.
token |
- GitHub Personal Token
+ | 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, you may pass NOT_NEEDED instead
![]() |
@@ -23,6 +300,7 @@ Metrics also have general options that impact global metrics rendering.
user |
GitHub username
+Defaults to token owner username.
![]() |
@@ -32,6 +310,7 @@ Metrics also have general options that impact global metrics rendering.
repo |
GitHub repository
+This option is revevalant only for repositories templates
![]() |
@@ -41,6 +320,10 @@ Metrics also have general options that impact global metrics rendering.
committer_token |
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, it will use token instead, since gists are outside of scope
+
![]() |
@@ -51,7 +334,8 @@ Metrics also have general options that impact global metrics rendering.
committer_branch |
- Branch used to commit rendered metrics
+ | Target branch
+Default value is set to your repository default branch
![]() |
@@ -61,6 +345,7 @@ Metrics also have general options that impact global metrics rendering.
committer_message |
Commit message
+Use ${filename} to display filename
![]() |
@@ -70,7 +355,8 @@ Metrics also have general options that impact global metrics rendering.
committer_gist |
- Gist used to store metrics
+ | Gist id
+Specify an existing gist id (can be retrieved from its URL) when using output_action: gist.
![]() |
@@ -79,7 +365,8 @@ Metrics also have general options that impact global metrics rendering.
filename |
- Rendered metrics output path
+ | Output path
+When using an asterisk (*), correct extension will automatically be applied according to config_output value
![]() |
@@ -89,7 +376,8 @@ Metrics also have general options that impact global metrics rendering.
markdown |
- Rendered markdown output path
+ | Markdown template path
+It can be either a local path or a full link (e.g. https://raw.githubusercontent.com)
![]() |
@@ -99,7 +387,7 @@ Metrics also have general options that impact global metrics rendering.
markdown_cache |
- Rendered markdown file cache
+ | Markdown file cache
![]() |
@@ -110,6 +398,18 @@ Metrics also have general options that impact global metrics rendering.
output_action |
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 additionaly merge pull request
+pull-request-squash: same as pull-request and additionaly squash and merge pull request
+pull-request-rebase: same as pull-request and additionaly 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
+
![]() |
@@ -121,17 +421,25 @@ Metrics also have general options that impact global metrics rendering.
output_condition |
Output condition
+
+always: always try to push changes
+data-changed: skip changes if no data changed (e.g. like when only metadata changed)
+
![]() |
- type: string
-
-default: always
-allowed values: |
+ type: undefined
+
|
optimize |
- SVG optimization
+ | Optimization features
+
+css: purge and minify CSS styles
+xml: pretty-print XML (useful to reduce diff)
+svg: optimization with SVGO (experimental, require --optimize-svg experimental flag)
+
+Some templates may not support all options
![]() |
@@ -143,7 +451,8 @@ Metrics also have general options that impact global metrics rendering.
setup_community_templates |
- Additional community templates to setup
+ | Community templates to setup
+See community templates guide for more informations
![]() |
@@ -154,7 +463,9 @@ Metrics also have general options that impact global metrics rendering.
template |
- Template to use
+ | Template
+Community templates must be prefixed by at sign (@)
+See list of supported templates
![]() |
@@ -164,7 +475,12 @@ Metrics also have general options that impact global metrics rendering.
query |
- Additional query parameters
+ | 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
+
![]() |
@@ -175,6 +491,8 @@ Metrics also have general options that impact global metrics rendering.
extras_css |
Extra CSS
+Custom CSS that will be injected in used template.
+Useful to avoid creating a new template just to tweak some styling
![]() |
@@ -184,7 +502,8 @@ Metrics also have general options that impact global metrics rendering.
config_timezone |
- Timezone used
+ | Timezone for dates
+See list of supported timezone
![]() |
@@ -194,7 +513,10 @@ Metrics also have general options that impact global metrics rendering.
config_order |
- Configure content order
+ | 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
![]() |
@@ -205,7 +527,9 @@ Metrics also have general options that impact global metrics rendering.
config_twemoji |
- Use twemojis instead of emojis
+ | Use twemojis
+Replace emojis by twemojis to have a consistent render across all platforms
+May increase filesize.
![]() |
@@ -217,6 +541,9 @@ Metrics also have general options that impact global metrics rendering.
config_gemoji |
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.
+May increase filesize
![]() |
@@ -227,7 +554,15 @@ Metrics also have general options that impact global metrics rendering.
config_display |
- Render display width
+ | 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)
+
+
![]() |
@@ -239,7 +574,7 @@ Metrics also have general options that impact global metrics rendering.
config_animations |
- SVG CSS animations
+ | Use CSS animations
![]() |
@@ -250,7 +585,8 @@ Metrics also have general options that impact global metrics rendering.
config_base64 |
- Encode images links into base64 data
+ | Base64-encoded images
+Enable this option to make self-contained ouput (i.e. with no external links)
![]() |
@@ -261,7 +597,21 @@ Metrics also have general options that impact global metrics rendering.
config_padding |
- Image padding
+ | 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
![]() |
@@ -271,7 +621,17 @@ Metrics also have general options that impact global metrics rendering.
config_output |
- Output image format
+ | 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)
+
![]() |
@@ -282,7 +642,7 @@ Metrics also have general options that impact global metrics rendering.
retries |
- Number of retries
+ | Retries in case of failures (for rendering)
![]() |
@@ -295,7 +655,7 @@ Metrics also have general options that impact global metrics rendering.
retries_delay |
- Time to wait (in seconds) before each retry
+ | Delay between each retry (in seconds, for rendering)
![]() |
@@ -308,7 +668,7 @@ Metrics also have general options that impact global metrics rendering.
retries_output_action |
- Number of retries (output action)
+ | Retries in case of failures (for output action)
![]() |
@@ -321,7 +681,7 @@ Metrics also have general options that impact global metrics rendering.
retries_delay_output_action |
- Time to wait (in seconds) before each retry (output action)
+ | Delay between each retry (in seconds, for output action)
![]() |
@@ -334,7 +694,8 @@ Metrics also have general options that impact global metrics rendering.
delay |
- Use this to avoid triggering abuse mechanics on large workflows
+ | Job delay
+This can be used to avoid triggering GitHub abuse mechanics on large workflows
![]() |
@@ -347,17 +708,21 @@ Metrics also have general options that impact global metrics rendering.
use_prebuilt_image |
- Use pre-built image from GitHub registry
+ | Use pre-built docker image from GitHub container registry
+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
+ | ๐ง For development
+type: boolean
default: yes
|
plugins_errors_fatal |
- Die on plugins errors
+ | 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
![]() |
@@ -368,7 +733,8 @@ Metrics also have general options that impact global metrics rendering.
debug |
- Debug logs
+ | Debug mode
+This setting is automatically enable if a job fail (useful with plugins_errors_fatal: yes)
![]() |
@@ -379,7 +745,7 @@ Metrics also have general options that impact global metrics rendering.
verify |
- Verify SVG
+ | SVG validity check
![]() |
@@ -391,6 +757,12 @@ Metrics also have general options that impact global metrics rendering.
debug_flags |
Debug flags
+
+--cakeday: simulate registration anniversary
+--hireable: simulate "Available for hire" account setting
+--halloween: enable halloween colors
+--error: force render error
+
![]() |
@@ -402,7 +774,8 @@ Metrics also have general options that impact global metrics rendering.
dryrun |
- Enable dry-run
+ | Dry-run
+Contrary to output_action: none, output file won't be available in /metrics_renders directory
![]() |
@@ -414,6 +787,7 @@ Metrics also have general options that impact global metrics rendering.
experimental_features |
Experimental features
+No backward compatibility is guaranteed for these features
![]() |
@@ -435,342 +809,4 @@ Metrics also have general options that impact global metrics rendering.
default: no
-
-
-*[โ Full specification](metadata.yml)*
-
-### ๐ ๏ธ General configuration
-
-A GitHub personal access token is required in `token` option.
-It cannot be `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}` as these are special tokens scoped to a single repository, so metrics would not be able to fetch any user related data or external repositories informations.
-
-By default, metrics will be generated for the user who owns the `token`, but it is possible to generate them for another user or an organization using `user` option. Additional scopes may be required to do so.
-
-To generate metrics for a repository, use `user` option to specify the repository owner, and `repo` option to specify its name.
-
-Committer options lets you specify how to rendered metrics should be pushed.
-Usually leaving default values is fine, but you have the possibility to change which user will commit to repository using `committer_token`, on which branch using `committer_branch` and with a specific commit message using `committer_message`.
-
-You may also be interested in using [pull requests](/source/plugins/core#-using-commits-pull-requests-or-manual-review-to-handle-metrics-output) instead of commits.
-
-When generating multiple metrics, you'll need to save them under different `filename`s to avoid them being overwritten at each step.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- token: ${{ secrets.METRICS_TOKEN }}
- user: lowlighter
- repo: metrics
- committer_token: ${{ github.token }}
- committer_branch: my-branch
- committer_message: Update metrics
- filename: metrics.svg
- # ... other options
-```
-
-### ๐ผ๏ธ Templates configuration
-
-To use a different template, pass its identifier to `template` option.
-See the [list of supported templates](/source/templates/README.md).
-
-It is possible to use templates from any forked repositories (not necessarly your own) while using official releases using [community templates](/source/templates/community/README.md).
-
-Some templates may accept additional custom options that you can pass through the `query` option, using a JSON formatted string.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- template: "@super-metrics"
- setup_community_templates: octocat/metrics@master:super-metrics, octocat/metrics@master:trusted-metrics+trust
- query: '{"custom_color":"#FF0000"}'
-```
-
-### ๐จ Custom CSS styling
-
-You can inject CSS rules using `extras_css` option.
-
-If you make heavy use of this option, consider using [community templates](/source/templates/community/README.md) instead.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- base: header
- extras_css: |
- h2 {
- color: red;
- }
-```
-
-### ๐ Set timezone
-
-By default, dates are based on Greenwich meridian (GMT/UTC).
-
-Set your timezone (see [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of supported timezones) using `config_timezone` option.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_timezone: Europe/Paris
-```
-
-### ๐ฆ Ordering content
-
-You can order metrics content by using `config_order` option.
-
-It is not mandatory to specify all partials of used templates.
-Omitted one will be appended using default order.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- base: header
- plugin_isocalendar: yes
- plugin_languages: yes
- plugin_stars: yes
- config_order: base.header, isocalendar, languages, stars
-```
-
-### ๐ฅณ Render GitHub custom emojis
-
-GitHub provide additional emojis which are not registered in Unicode standard (:octocat:, :shipit:, :trollface:, ...).
-You can choose to render (or not) [GitHub emojis](https://github.com/github/gemoji).
-
-It may increase filesize since it replace special strings by base64 images.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_gemoji: yes
-```
-
-### ๐ Using twemojis instead of emojis
-
-You can choose to use [twemojis](https://github.com/twitter/twemoji) instead of regular emojis so rendered metrics are more consistent across all platforms.
-
-It may increase filesize since it replace unicode characters by SVG images.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_twemoji: yes
-```
-
-### โ๏ธ Controlling display size
-
-Some templates like `classic` and `repositories` support different output display size:
-- `regular` (default) will render a medium-sized image, which is suitable for both desktop and mobile displays and is preferable when using data-intensive metrics (since text may be scaled down on small devices)
-- `large` will render a large-sized image, which may be more suitable for some plugins (like displaying topics icons, repository contributors, etc.)
-- `columns` will render a full-width image, with two columns on desktop / one column on mobile
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_display: large
-```
-
-### ๐๏ธ SVG CSS Animations
-
-As rendered metrics use HTML and CSS, some templates have animations.
-You can choose to disable them by using `config_animations` option.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- committer_branch: my-branch
-```
-
-### ๐ฒ Adjust padding
-
-Height of rendered metrics is computed after being rendered through an headless browser.
-As it can depend on fonts and operating system, it is possible that final result is cropped or has blank space at the bottom.
-
-You can adjust padding by using `config_padding` option.
-
-Specify a single value to apply it to both height and with, and two values to use the first one for width and the second for height. Both positive and negative values are accepted.
-
-The allowed format is `(absolute padding) + (relative padding)%` (each operand is optional).
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_padding: 0, 8 + 11% # 0px width padding, 8px + 11% height padding
-```
-
-### ๐งถ Using commits, pull requests, manual reviews or gists to handle metrics output
-
-It is possible to configure output behaviour using `output_action` option, which can be set to:
-- `none`, where output will be generated in `/rendered/${filename}` without being pushed
- - You can then manually post-process it
-- `commit` (default), where output will directly be committed and pushed to `committer_branch`
-- `pull-request`, where output will be committed to a new branch with current run id waiting for to be merged in `committer_branch`
- - By appending either `-merge`, `-squash` or `-rebase`, pull request will be automatically merged with given method
- - This method is useful to combine all editions of a single run with multiples metrics steps into a single commit on targetted branch
- - If you choose to manually merge pull requests, be sure to disable `push:` triggers on your workflow, as it'll count as your own commit
-- `gist`, where output will be stored an already existing gist
- - To use this feature, a `gists` scope must be granted to your `token` and `committer_gist` identifier must be provided
-
-It also possible to alter output condition using `output_condition` option, which can be set to:
-- `always`, to always push changes (provided that git sha changed)
-- `data-changed`, to skip changes if no actual data changed (e.g. when only render timestamp changed)
-
-#### โน๏ธ Examples workflows
-
-```yaml
-# The following will:
-# - open a pull request with "my-metrics-0.svg" as first commit
-# - append "my-metrics-1.svg" as second commit
-# - merge pull request (as second step is set to "pull-request-merge")
-
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- filename: my-metrics-0.svg
- output_action: pull-request
-
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- filename: my-metrics-1.svg
- output_action: pull-request-merge
-```
-
-### โป๏ธ Retrying automatically failed rendering and output action
-
-Rendering is subject to external factors and can fail from time to time.
-It is possible to mitigate this issue using `retries` and `retries_delay` options to automatically retry later metrics rendering and avoid workflow fails.
-
-Output action is also subject to GitHub API rate-limiting and status and can fail from time to time.
-It is possible to mitigate this issue using `retries_output_action` and `retries_delay_output_action` options to automatically retry later metrics output action and avoid workflow fails. As this is a separate step from rendering, metrics rendering won't be computed again during this phase.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- retries: 3
- retries_delay: 300
- retries_output_action: 5
- retries_delay_output_action: 120
-```
-
-### ๐ฑ Convert output to PNG/JPEG or JSON
-
-It is possible to convert output from SVG to PNG or JPEG images and even to JSON by using `config_output` option.
-
-Note that `png` does not support animations while `jpeg` does not support both animations and transparency.
-
-Using `json` output can be useful if you want to retrieve all data computed by metrics without rendering it.
-It could then be processed for other usages.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_output: png
-```
-
-### ๐จ๏ธ Convert output to PDF
-
-It is possible to convert output to PDF when using a markdown template by setting `config_output` to `markdown-pdf`.
-
-It is advised to keep `config_base64: yes` to encode embed images in base64 and make self-contained documents.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- markdown: template.md
- markdown_cache: .cache
- config_output: markdown-pdf
- config_base64: yes
-```
-
-### ๐๏ธ Optimize SVG output
-
-It is possible to optimize SVG output and reducing its filesize to improve loading times and reduce storage.
-
-The following optimizations are supported:
-- `css`, which purge unused CSS and minify remaining styles
-- `xml`, which pretty-print XML (it also helps reducing diffs between commits)
-- `svg`, which optimize SVG with SVGO (experimental)
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- optimize: css, xml
-
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- optimize: css, xml, svg
- experimental_features: --optimize-svg
-```
-
-### โจ Render `Metrics insights` statically
-
-It is possible to generate an HTML file containing `โจ Metrics insights` output by setting `config_output` to `insights`. Resulting output will already be pre-rendered and not contain any external sources (i.e. no JavaScript and style sheets).
-
-> Note that like `โจ Metrics insights` content is not configurable.
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- config_output: insights
-```
-
-### ๐ณ Faster execution with prebuilt docker images
-
-If you're using the official release `lowlighter/metrics` as a GitHub Action (either a specific version, `@latest` or `@master`), it'll pull a prebuilt docker container image from [GitHub Container Registry](https://github.com/users/lowlighter/packages/container/package/metrics) which contains already installed dependencies which will cut execution time from ~5 minutes to ~1 minute.
-
-These are published through this automated [workflow](/.github/workflows/workflow.yml).
-
-As code is frozen on docker container images, this feature is disabled on forks to take into account any changes you've made on it. In case you wish to use official releases along with a custom template present on your fork, check out [community templates](/source/templates/community/README.md).
-
-#### โน๏ธ Examples workflows
-
-```yaml
-- uses: lowlighter/metrics@latest
- with:
- # ... other options
- use_prebuilt_image: yes
-```
+
\ No newline at end of file
diff --git a/source/plugins/core/metadata.yml b/source/plugins/core/metadata.yml
index 726b11ec..9cfbda9a 100644
--- a/source/plugins/core/metadata.yml
+++ b/source/plugins/core/metadata.yml
@@ -1,5 +1,6 @@
name: "๐งฑ Core"
category: core
+description: Global configuration and options
supports:
- user
- organization
@@ -7,314 +8,375 @@ supports:
scopes: []
inputs:
- # User account personal token
- # No additional scopes are needed unless you want to include private repositories metrics
- # Some plugins may also require additional scopes
- # โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- # If you're only using plugins which don't really require a GitHub token, you may pass "NOT_NEEDED" as value
token:
- description: GitHub Personal 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, you may pass `NOT_NEEDED` instead
type: token
required: true
- # GitHub username
- # Defaults to "token" owner
user:
- description: GitHub username
+ description: |
+ GitHub username
+
+ Defaults to `token` owner username.
type: string
default: ""
- # GitHub repository
- # Compute metrics for a repository instead ("user" being the repository owner)
- # Check https://github.com/lowlighter/metrics/blob/master/source/templates/repository/README.md for more informations
repo:
- description: GitHub repository
+ description: |
+ GitHub repository
+
+ This option is revevalant only for repositories templates
type: string
default: ""
- # Set to "${{ github.token }}" or "${{ secrets.GITHUB_TOKEN }}"
- # GITHUB_TOKEN is a special auto-generated token restricted to current repository, which is used to push files in it
committer_token:
- description: GitHub Token used to commit metrics
+ 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`, it will use `token` instead, since gists are outside of scope
type: token
default: ${{ github.token }}
- # Branch used to commit rendered metrics
committer_branch:
- description: Branch used to commit rendered metrics
- type: string
- default: "" # Defaults to your repository default branch
+ description: |
+ Target branch
- # Commit message
- # Use "${filename}" to display filename
- committer_message:
- description: Commit message
- type: string
- default: Update ${filename} - [Skip GitHub Action]
-
- # Instead of saving metrics to a repository, it's possible to save them to a gist to avoid "commits pollution"
- # Gist must be created prior and you must pass its identifier in the following option
- # Set "gist" in "output_action" to use this option
- committer_gist:
- description: Gist used to store metrics
+ Default value is set to your 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`.
type: string
default: ""
- # Rendered metrics output path, relative to repository's root
- # When using "*", the correct extension will automatically on "config_output" value
filename:
- description: Rendered metrics output path
+ description: |
+ Output path
+
+ When using an asterisk (`*`), correct extension will automatically be applied according to `config_output` value
type: string
default: github-metrics.*
- # Rendered markdown output path (when using a markdown template)
- # It can be either a local path or a link (e.g. raw.githubusercontent.com)
markdown:
- description: Rendered markdown output path
+ 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
- # Rendered markdown file cache (when using a markdown template)
markdown_cache:
- description: Rendered markdown file cache
+ description: Markdown file cache
type: string
default: .cache
- # Output action
output_action:
- description: 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 additionaly merge pull request
+ - `pull-request-squash`: same as `pull-request` and additionaly squash and merge pull request
+ - `pull-request-rebase`: same as `pull-request` and additionaly 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
type: string
default: commit
values:
- - none # Only generate file in "/metrics_renders"
- - commit # Commit output to "committer_branch"
- - pull-request # Commit output to a new branch and open a pull request to "committer_branch"
- - pull-request-merge # Same as "pull-request" and additionaly merge pull request
- - pull-request-squash # Same as "pull-request" and additionaly squash and merge pull request
- - pull-request-rebase # Same as "pull-request" and additionaly rebase and merge pull request
- - gist # Save output to "committer_gist"
+ - none
+ - commit
+ - pull-request
+ - pull-request-merge
+ - pull-request-squash
+ - pull-request-rebase
+ - gist
- # Output condition
output_condition:
- description: Output condition
- type: string
- default: always
- values:
- - always # Always push changes
- - data-changed # Skip changes if no actual data changed (e.g. when only render timestamp changed)
+ description: |
+ Output condition
+ - `always`: always try to push changes
+ - `data-changed`: skip changes if no data changed (e.g. like when only metadata changed)
- # Optimize SVG image to reduce its filesize
- # Some templates may not support this option
optimize:
- description: SVG optimization
+ description: |
+ Optimization features
+ - `css`: purge and minify CSS styles
+ - `xml`: pretty-print XML (useful to reduce diff)
+ - `svg`: optimization with SVGO (experimental, require `--optimize-svg` experimental flag)
+
+ Some templates may not support all options
type: array
default: css, xml
format:
- comma-separated
values:
- - css # Purge and minify CSS styles
- - xml # Pretty-print XML
- - svg # Optimize SVG with SVGO (experimental, require --optimize-svg flag)
+ - css
+ - xml
+ - svg
# Setup additional templates from remote repositories
setup_community_templates:
- description: Additional community templates to setup
+ 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
- - /(?