name: "🏅 Repository contributors"
category: github
index: 6
supports:
  - repository
scopes:
  - public_access
inputs:

  # Enable or disable plugin
  plugin_contributors:
    description: Display repository contributors
    type: boolean
    default: no

  # Base reference (commit, tag, branch, etc.)
  plugin_contributors_base:
    description: Base reference
    type: string
    default: ""
    example: commit, tag or branch

  # Head reference (commit, tag, branch, etc.)
  plugin_contributors_head:
    description: Head reference
    type: string
    default: master

  # Ignored contributors (useful to ignore bots users)
  plugin_contributors_ignored:
    description: Contributors to ignore
    type: array
    format: comma-separated
    default: github-actions[bot], dependabot[bot], dependabot-preview[bot]

  # Display total contributions for each contributor
  plugin_contributors_contributions:
    description: Display contributions
    type: boolean
    default: no

  # Sections to display
  plugin_contributors_sections:
    description: Sections to display
    type: array
    format: comma-separated
    default: contributors
    example: contributors
    values:
      - contributors # Display all contributors
      - categories   # Display contributors per contributions categories

  # Contributions categories
  # This requires "plugin_contributors_sections" to have "categories" in it to be effective
  #
  # Pass a JSON object which contains a mapping of category with fileglobs.
  # Contributors will be sorted into each category to reflect their contributions.
  # Note that order a file will only match the first category matching
  plugin_contributors_categories:
    description: Contributions categories
    type: json
    default: |
      {
        "📚 Documentation": ["README.md", "docs/**"],
        "💻 Code": ["source/**", "src/**"],
        "#️⃣ Others": ["*"]
      }
