Skip to content

Latest commit

 

History

History
115 lines (85 loc) · 2.74 KB

README.md

File metadata and controls

115 lines (85 loc) · 2.74 KB

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