Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wow-actions/contributors-list

🌈 Automatically generate contributors.svg for your repository
https://github.com/wow-actions/contributors-list

contributors github-actions

Last synced: 24 days ago
JSON representation

🌈 Automatically generate contributors.svg for your repository

Awesome Lists containing this project

README

        

Contributors List


build
MIT License
Language
PRs Welcome
website

Automatically generate contributors.svg for your repository

## Usage

Create a workflow file such as `.github/workflows/contributors.yml`:

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
svgPath: CONTRIBUTORS.svg
```

### Inputs

Various inputs are defined to let you configure the action:

> Note: [Workflow command and parameter names are not case-sensitive](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#about-workflow-commands).

- `sort`: Specify if sort contributors by contributions or not. Default: `true`.
- `round`: Specify if clip the avatar to rounded or not. Default: `true`.
- `count`: Specify the max count of contributors listed. Default list all contributors.
- `truncate`: Truncate username by specified length, `0` for no truncate. Default: `12`.
- `affiliation`: Specify the type of collaborators. Default: `direct`. Options: `all/direct/outside`.
- `'outside'`: All outside collaborators of an organization-owned repository.
- `'direct'`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.
- `'all'`: All collaborators the authenticated user can see.
- `includeBots`: Specify if include bots in the contributors list or not. Default `true`.
- `excludeUsers`: Users separated by space to exclude in the contributors list.
- `svgPath`: The path to save generated SVG. Default `'CONTRIBUTORS.svg'`.
- `svgWidth`: Width of the generated SVG. Default: `740`.
- `avatarSize`: Size of user avatar. Default: `64`.
- `avatarMargin`: Margin of user avatar. Default: `5`.
- `userNameHeight`: Height of user name. Default: `0`.
- `svgTemplate`: Template to render SVG. Default:
```html


.contributor-link {
cursor: pointer;
}

{{{ contributors }}}

```
- `itemTemplate`: Template to render user item. Default:
```html



```
- `commitMessage`: Commit message of the github action. Default: `'chore: update contributors'`
- `noCommit`: Changes will not be committed. This options requires a local clone and will updated if required the contributor svg. Default: `false`.

## Examples

### Rounded Avatar

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
round: true
```

### Squared Avatar

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
round: false
```

### With UserName

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
userNameHeight: 19
itemTemplate: >



{{{ name }}}


```

### Only Bots

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
svgTemplate: >

.contributor-link { cursor: pointer; }
{{{ bots }}}

```

### Only Collaborators

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
svgTemplate: >

.contributor-link { cursor: pointer; }
{{{ collaborators }}}

```

### Contributors And Bots

```yml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
includeBots: false
svgTemplate: |

.contributor-link { cursor: pointer; }

Contributors

{{{ contributors }}}

Bots

{{{ bots }}}


```

### Contributors, Bots And Collaborators

```yaml
name: Contributors
on:
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
push:
branches:
- master
jobs:
contributors:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
includeBots: false
svgTemplate: |

.contributor-link { cursor: pointer; }

Contributors

{{{ contributors }}}

Bots

{{{ bots }}}

Collaborators

{{{ collaborators }}}


```

## License

The scripts and documentation in this project are released under the [MIT License](LICENSE).