Skip to content

GitHub Action for generating a list of contibutors of a repository to be used in markdown.

License

Notifications You must be signed in to change notification settings

kontrolplane/generate-contributors-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

contributors

The contributors GitHub Action helps ensuring that contributors get the recognition that they deserve. It will generate code that can be used within markdown files, e.g., README.md to show profile picture of people that contributed to a repository and the link to their profiles.

Example output [overview]

Example usage [basic - public repository]

github-action

name: update-contributors

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * 0'

jobs:
  update-contributors:
    name: validate-pull-request-title
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v4

      - name: update-contributors
        uses: kontrolplane/generate-contributors-list@latest
        with:
          owner: kontrolplane
          repository: pull-request-title-validator

      - name: open-pull-request
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git config user.name github-actions
          git config user.email [email protected]
          git add README.md
          git commit -m "chore: update contributors section"
          git push -u origin update-contributors
          gh pr create \
            --title "chore: update contributors" \
            --body "Automatically update contributors section." \
            --base main \
            --head update-contributors

README.md

...

## contributors

[//]: kontrolplane/generate-contributors-list

[//]: kontrolplane/generate-contributors-list

Example usage [basic - private repository]

github-action

name: update-contributors

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * 0'

jobs:
  update-contributors:
    name: validate-pull-request-title
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v4

      - name: update-contributors
        uses: kontrolplane/generate-contributors-list@latest
        with:
          token: ${secrets.GITHUB_TOKEN}
          owner: kontrolplane
          repository: private-repository

...

README.md

...

## contributors

[//]: kontrolplane/generate-contributors-list

[//]: kontrolplane/generate-contributors-list

Example output [code]

README.md

[//]: kontrolplane/generate-contributors-list

<a href="https://github.com/levivannoort"><img src="https://avatars.githubusercontent.com/u/73097785?v=4" title="levivannoort" width="50" height="50"></a>

[//]: kontrolplane/generate-contributors-list

About

GitHub Action for generating a list of contibutors of a repository to be used in markdown.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published