| Option | Description |
plugin_contributors
|
Enable contributors plugin
![]() |
type: boolean
default: no
|
plugin_contributors_base
|
Base reference
Can be a commit, tag, branch, etc.
![]() |
type: string
|
plugin_contributors_head
|
Head reference
Can be a commit, tag, branch, etc.
![]() |
type: string
default: master
|
plugin_contributors_ignored
|
Ignored users
Can be used to ignore bots activity
![]() |
⊠Inherits users_ignored
type: array
(comma-separated)
|
plugin_contributors_contributions
|
Contributions count
![]() |
type: boolean
default: no
|
plugin_contributors_sections
|
Displayed sections
contributors: all contributors
categories: contributors sorted by contributions categories (must be configured with plugin_contributors_categories)
![]() |
type: array
(comma-separated)
default: contributors
allowed values: |
plugin_contributors_categories
|
Contribution categories
This option requires plugin_contributors_sections to have categories in it to be effective.
Pass a JSON object mapping category with fileglobs
![]() |
đ Web instances must configure settings.json:
- metrics.run.tempdir
- metrics.run.git
type: json
default: {
"đ Documentation": ["README.md", "docs/**"],
"đģ Code": ["source/**", "src/**"],
"#ī¸âŖ Others": ["*"]
}
|
## đī¸ Setting up contribution categories
Pass a JSON object to `plugin_contributors_categories` with categories names as keys and arrays of fileglobs as values to configure contributions categories.
Each modified file by a contributor matching a fileglob will add them in said category.
> đĄ File matching respect keys order
> đĄ Use `|` YAML multiline operator for better readability
*Example: *
```yaml
- uses: lowlighter/metrics@latest
with:
plugin_contributors: yes
plugin_contributors_categories: |
{
"đ Documentation": ["README.md", "docs/**"],
"đģ Code": ["source/**", "src/**"],
"#ī¸âŖ Others": ["*"]
}
```
## âšī¸ Examples workflows
```yaml
name: Contributors with contributions count
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.contributors.contributions.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ""
template: repository
repo: metrics
plugin_contributors: yes
plugin_contributors_contributions: yes
```
```yaml
name: Contributors by categories
uses: lowlighter/metrics@latest
with:
filename: metrics.plugin.contributors.categories.svg
token: ${{ secrets.METRICS_TOKEN }}
base: ""
template: repository
repo: metrics
plugin_contributors: yes
plugin_contributors_sections: categories
plugin_contributors_categories: |
{
"đ§Š Plugins / đŧī¸ templates":["source/plugins/**", "source/templates/**"],
"đ Documentation":["README.md", "**/README.md", "**/metadata.yml"],
"đģ Code (other)":["source/**", "Dockerfile"]
}
```