Skip to content

Latest commit

 

History

History
189 lines (177 loc) · 6.47 KB

README.md

File metadata and controls

189 lines (177 loc) · 6.47 KB
← Back to plugins index

🏅 Repository contributors

This plugin display repositories contributors from a commit range along with additional stats.

⚠️ Disclaimer

This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub. All product and company names are trademarks™ or registered® trademarks of their respective holders.

Supported features
→ Full specification
📘 Repository template
📓 Repositories
🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
By contribution types
By number of contributions

➡️ Available options

OptionDescription

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

type: array (comma-separated)
default: contributors
allowed values:
  • contributors
  • categories

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 file globs

🌐 Web instances must configure settings.json:
  • metrics.run.tempdir
  • metrics.run.git
type: json
default:
→ Click to expand
{
  "📚 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 file globs as values to configure contributions categories.

Each modified file by a contributor matching a file glob will add them in said category.

💡 File matching respect keys order

💡 Use | YAML multiline operator for better readability

*Example: *

- uses: lowlighter/metrics@latest
  with:
    plugin_contributors: yes
    plugin_contributors_categories: |
      {
        "📚 Documentation": ["README.md", "docs/**"],
        "💻 Code": ["source/**", "src/**"],
        "#️⃣ Others": ["*"]
      }

ℹ️ Examples workflows

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"]
    }