Varun Sridharan
VS Writings

Follow

VS Writings

Follow
GitHub Action - Repository Roster | 📢 Shout-out Supporters In Your README.md

GitHub Action - Repository Roster | 📢 Shout-out Supporters In Your README.md

Varun Sridharan's photo
Varun Sridharan
·Nov 6, 2020·

2 min read

As developers, we put a lot of work into our GitHub repos to make them as useful as possible for others, but great projects sometimes go under-appreciated, and under-starred. Asking for stars is tacky, but publicly thanking your supporters by name in your README file is a sign of appreciation that happens to incentivize more users to join the crowd.

💡 Inspiration

One fine day I got an email DEV Digest in which I got attracted by the title 1 Step to Incentivize Stars and Forks on GitHub and decided to read the full article. it was new & interesting to me. Thanks to @ nastyox1 creating such an awesome tool. so I wanted to use it but I wanted it to be a markdown-table output which was not an option with that cloud-hosted service. so I decided to create this as an action that can provide various outputs.

check out the examples output


🚀 Usage

  1. Update Your README.md with the below code
  2. Setup Action Workflow File

Repository Stargazers

## ↳ Stargazers
<!-- REPOSITORY_STARS:START --> <!-- REPOSITORY_STARS:END -->

Repository Forks

## ↳ Forkers
<!-- REPOSITORY_FORKS:START --><!-- REPOSITORY_FORKS:END -->

ℹ️ Currently there are ways to auto-trigger the workflow when a user stars / forks the repository.

ℹ️ Using this action with the workflow trigger fork & watch is the best optmized way.

if you want to remove users that have un-stared / deleted the fork then you might have to use cron to handle it

Workflow File

name: "🙏 Repository Roster"

on:
  workflow_dispatch:
  fork:
  watch:
    types:
      - started

jobs:
  update_latest_roster:
    name: "🐔  Update Latest Roster"
    runs-on: ubuntu-latest
    steps:
      - name: "📥  Fetching Repository Contents"
        uses: actions/[email protected]

      - name: "🐔  Markdown - Repository Roster"
        uses: "varunsridharan/[email protected]"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Example Output

https://s2.do-spaces.com/2020/Nov/06/1604642798-178.jpg

For more details about the available config options. please check our GitHub repository

 
Share this