Skip to content

cjdenio/contributor_list

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

👥 Contributor List

GitHub Action to easily list contributors on your README!

🏁 Getting Started

In your repository, create a file named contributor_list.yml under .github/workflows/. Paste the following content into it:

name: Contributor List
on:
  push:
    branches:
      - master
jobs:
  contributor_list:
    name: Contributor List
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: docker://cjdenio/contributor_list:latest

Push to the repo, and your contributor list has been created! 🎉

↕️ Moving the contributor list

Don't want it at the end of the README? That's OK! Just move it to the place you'd like. Make sure you move the two <!-- DO NOT REMOVE --> comments along with it!

📝 Writing a custom template

Don't like the default look? You can write a custom Jinja template, then place it in the .github/contributor_list_template.md file. Here's the default one, for inspiration.

contributors is an array that looks like this (already sorted by number of contributions, by the way):

[
  {
    "login": "octocat",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "html_url": "https://github.com/octocat",
    "contributions": 32
  }
]

⚙️ Configuration

You can customize your contributor list with various options! Below is an example: (they're all optional, by the way)

name: Contributor List
on:
  push:
    branches:
      - master
jobs:
  contributor_list:
    name: Contributor List
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: docker://cjdenio/contributor_list:latest
        with:
          commit_message: 📝 Update contributors list
          # Max number of contributors to display on the README
          max_contributors: 5 # Default: 10
          # This enables showing contribution numbers on the README.
          # ⚠️ THIS WILL PUSH TO THE REPO AFTER EVERY COMMIT ⚠️
          show_numbers: true # Default: false
          # Markdown heading level for the contributors section
          header_level: 3 # Default: 2

🐛 Known Issues

👥 Contributors