The contributors plugin lets you display repositories contributors from a commit range, that can be specified through either sha, tags, branch, etc.
It's especially useful to acknowledge contributors on release notes.
|
Displaying contributors per categories
🔣 On web instances, sorting contributors per categories is an extra feature and must be enabled globally in
settings.json
To configure contributions categories, pass a JSON object to plugin_contributors_categories
(use |
multiline operator for better readability) with categories names as keys and an array of file glob as values:
plugin_contributors_categories: |
{
"📚 Documentation": ["README.md", "docs/**"],
"💻 Code": ["source/**", "src/**"],
"#️⃣ Others": ["*"]
}
Each time a file modified by a contributor match a fileglob, they will be added in said category. Matching is performed in keys order.
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'
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"]
}