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.
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.
- Add a readme.md file
- 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"
- If not given it will be added automatically as your last section in readme.
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
- To change the header of the section
header: Contributors
Default value is Contributors. Feature Credit: Hyeonseok Samuel Seo
- To change the image size inside the box
imageSize: 100
Default value is 100x100px
- To change the number of columns in a row
columnsPerRow: 6
Default value is 6
Akhil Mohan |
Mathieu Ferment |
Athul Cyriac Ajay |
This project is licensed under the MIT License - see the LICENSE file for details
- all-contributors-bot: Inspiration of this project