Git Product home page Git Product logo

contributors-readme-action's Introduction

Contributors-Readme-Action

Contributors-Readme-Action is a simple github action to automate contributors list in README file.
As it uses github action its secure and very easy to integrate into your projects. Once added it will automatically add all the contributors into your readme as well formated. Also the future ones ๐Ÿ˜„. Now why would you need a contributors list. Come on man, show some love to the ones who contribute to your project.๐Ÿ˜‰

The contributors list is fetched from GitHub API.

Getting Started

First Step

If your new to action add these to your .github/workflows/main.yml

on: [push, pull_request]

jobs:
  contrib-readme-job:
    runs-on: ubuntu-latest
    name: A job to automate contrib in readme
    steps:
      - name: Contribute List
        uses: akhilmhdh/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Thats it.
To add it to your to your existing workflow

  - uses: akhilmhdh/[email protected]
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Currently GITHUB_TOKEN doesn't have permission to directly commit on a protected branch. To solve this you may need to replace the github action token with an admin acc token as mentioned in this post by phips28. Hope in future github can give exception to actions in workflow.

Second Step

  1. Add a readme.md file
  2. If you want the contributors list to appear in a particular position add like this
.
.
<any-prefered-header-style eg:#,##,###> Contributors  
.
.

Contributors is the keyword in header and also add enter(\n) at last. Also Contributors keyword can be changed. Kindly go through the next section to know more about customization"

  1. If not given it will be added automatically as your last section in readme.

Optional parameters

You can add these optional parameters to modify the appearence of the list in your action script.

- name: Contribute List
  with:
    header: Developers
    columnsPerRow: 6  
  1. To change the header of the section
header: Contributors   

Default value is Contributors. Feature Credit: Hyeonseok Samuel Seo

  1. To change the image size inside the box
imageSize: 100

Default value is 100x100px

  1. To change the number of columns in a row
columnsPerRow: 6

Default value is 6

Contributors โœจ

akhilmhdh
Akhil Mohan
matks
Mathieu Ferment
athul
Athul Cyriac Ajay

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

contributors-readme-action's People

Contributors

akhilmhdh avatar athul avatar dependabot[bot] avatar github-actions[bot] avatar matks avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.