Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaywcjlove/github-action-contributors
Github action generates dynamic image URL for contributor list to display it!
https://github.com/jaywcjlove/github-action-contributors
actions avatar avatar-generator contributors contributors-avatar github-actions svg
Last synced: about 12 hours ago
JSON representation
Github action generates dynamic image URL for contributor list to display it!
- Host: GitHub
- URL: https://github.com/jaywcjlove/github-action-contributors
- Owner: jaywcjlove
- License: mit
- Created: 2022-01-26T04:09:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T21:23:35.000Z (3 months ago)
- Last Synced: 2024-10-29T11:24:16.823Z (about 2 months ago)
- Topics: actions, avatar, avatar-generator, contributors, contributors-avatar, github-actions, svg
- Language: JavaScript
- Homepage: https://jaywcjlove.github.io/github-action-contributors
- Size: 955 KB
- Stars: 35
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
github-action-contributors
===[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![Build & Deploy](https://github.com/jaywcjlove/github-action-contributors/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/github-action-contributors/actions/workflows/ci.yml)
[![Repo Dependents](https://badgen.net/github/dependents-repo/jaywcjlove/github-action-contributors)](https://github.com/jaywcjlove/github-action-contributors/network/dependents)Github action generates dynamic image URL for contributor list to display it!
The contributors list is fetched from [GitHub API](https://docs.github.com/cn/rest/repos/repos#list-repository-contributors).
## Contributors
As always, thanks to our amazing contributors!
Write contributors(**`htmlTable`**) to markdown Example:
Bot Users:
github-actions[bot]
renovate[bot]
Collaborators Users:
Write contributors(**`htmlList`**) to markdown Example:
## Usage
```yml
- run: mkdir -p build
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: build/CONTRIBUTORS.svg
avatarSize: 42- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
``````
https://jaywcjlove.github.io/github-action-contributors/CONTRIBUTORS.svg
```Use in markdown
```markdown
## ContributorsAs always, thanks to our amazing contributors!
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
```### Write contributors(**`htmlList`**) to markdown
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
avatarSize: 42- name: Modify README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: README.md
body: '${{steps.contributors.outputs.htmlList}}'
```Use in `README.md` markdown
```markdown
## ContributorsAs always, thanks to our amazing contributors!
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
```Write contributors(**`htmlList`**) to markdown Example:
### Write contributors(**`htmlTable`**) to markdown
```yml
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
id: contributors
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
openDelimiter: ''
closeDelimiter: ''
hideName: 'true' # Hide names in htmlTable
avatarSize: 100 # Set the avatar size.- name: Modify htmlTable README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: README.md
body: '${{steps.contributors.outputs.htmlTable}}'
```Use in `README.md` markdown
```markdown
## ContributorsAs always, thanks to our amazing contributors!
will be replaced here
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
```Write contributors(**`htmlTable`**) to markdown Example:
Bot Users:
## Inputs
- `token` - Your `GITHUB_TOKEN`. This is required. Why do we need `token`? Read more here: [About the GITHUB_TOKEN secret](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#about-the-github_token-secret). Default: `${{ github.token }}`
- `filter-author` - Regular expression filtering'.
- `count` - Specify the max count of contributors listed. Default list all contributors(max 100).
- `output` - output image path. default: `CONTRIBUTORS.svg`
- `truncate` - Truncate username by specified length, `0` for no truncate. default: `12`
- `svgWidth` - Width of the generated SVG. default: `740`
- `avatarSize` - Size of user avatar. default: `24`
- `avatarMargin` - Margin of user avatar. default: `5`
- `hideName` - Hide names in `htmlTable`
- `userNameHeight` - Height of user name. default: `0`
- `svgTemplate` - Template to render SVG.```xml
.contributor-link { cursor: pointer; }
{{{ contributors }}}```
## Outputs
- `svg` svg image string: ` form string
- `htmlTableBots` Contributor(Bot Users) HTML \ form string
- `htmlList` Contributor HTML \ list form string
- `htmlListBots` Contributor(Bot Users) HTML \ list form string
- `htmlCollaboratorsTable` Collaborators user HTML form string
- `htmlCollaboratorsTableBots` Collaborators user(Bot Users) HTML form string
- `htmlCollaboratorsList` Collaborators user HTML list form string
- `htmlCollaboratorsListBots` Collaborators user(Bot Users) HTML form string### `htmlTable`
```html
jaywcjlove
```
### `htmlList`
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
## License
Licensed under the MIT License.