Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: akhilmhdh/contributors-readme-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.6
Choose a base ref
...
head repository: akhilmhdh/contributors-readme-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.10
Choose a head ref

Commits on Aug 8, 2022

  1. chore: updated readme

    akhilmhdh committed Aug 8, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c3fb36d View commit details

Commits on Dec 28, 2022

  1. Update node12 -> node18

    Nodejs LTS is currently 18.12.1 and 18 will get you the latest as per their dockerhub:
    https://nodejs.org/en/download/
    https://hub.docker.com/_/node
    jessebot authored and akhilmhdh committed Dec 28, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2e97e9f View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    51648f2 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    511de4e View commit details

Commits on Mar 29, 2024

  1. Bump json5 from 2.2.0 to 2.2.3

    Bumps [json5](https://github.com/json5/json5) from 2.2.0 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](json5/json5@v2.2.0...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and akhilmhdh committed Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    68a8da6 View commit details
  2. Bump minimatch from 3.0.4 to 3.1.2

    Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
    - [Release notes](https://github.com/isaacs/minimatch/releases)
    - [Commits](isaacs/minimatch@v3.0.4...v3.1.2)
    
    ---
    updated-dependencies:
    - dependency-name: minimatch
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and akhilmhdh committed Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aa83aa5 View commit details
  3. Bump @actions/core from 1.6.0 to 1.9.1

    Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
    - [Release notes](https://github.com/actions/toolkit/releases)
    - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
    - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)
    
    ---
    updated-dependencies:
    - dependency-name: "@actions/core"
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and akhilmhdh committed Mar 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    62ee33c View commit details

Commits on Apr 20, 2024

  1. refactor: update set-output deprecated command

    codebydant authored and akhilmhdh committed Apr 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5bd0495 View commit details
  2. feat: updated readme to new release version

    akhilmhdh committed Apr 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0bc98bb View commit details
  3. feat: removed check for push for manual run

    akhilmhdh committed Apr 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5782c9c View commit details
  4. docs(contributor): contrib-readme-action has updated readme

    github-actions[bot] authored Apr 20, 2024
    Copy the full SHA
    266986b View commit details

Commits on Apr 26, 2024

  1. Update README.md

    KPCOFGS authored and akhilmhdh committed Apr 26, 2024
    Copy the full SHA
    686b258 View commit details
  2. docs(contributor): contrib-readme-action has updated readme

    github-actions[bot] authored Apr 26, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    507d466 View commit details

Commits on May 3, 2024

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0b5562f View commit details
  2. Also build it for you

    melroy89 authored and akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d2ccc98 View commit details
  3. Also do not capitalize the name. It's already capitalized. In fact, y…

    …our code will break my name
    melroy89 authored and akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cdcdde6 View commit details
  4. Add new build

    melroy89 authored and akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c78bc93 View commit details
  5. chore: updated readme for new release

    akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e8b98b View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c957265 View commit details
  7. feat: correcting spacing

    akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d560e9d View commit details
  8. feat: updated readme with added action permission and preps for next …

    …release
    akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    37ed032 View commit details
  9. docs(contributor): contrib-readme-action has updated readme

    github-actions[bot] authored May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    95e8524 View commit details
  10. fix: spacing in between tr

    akhilmhdh committed May 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1ff4c56 View commit details
Showing with 36,664 additions and 7,306 deletions.
  1. +1 −0 .github/workflows/main.yml
  2. +24 −11 README.md
  3. +1 −1 action.yml
  4. BIN assets/contributors-table.png
  5. +146 −95 contributors.md
  6. +26,384 −1,084 dist/index.js
  7. +1 −1 dist/index.js.map
  8. +60 −0 dist/licenses.txt
  9. +1 −1 dist/sourcemap-register.js
  10. +10,017 −6,087 package-lock.json
  11. +8 −7 package.json
  12. +0 −4 src/index.js
  13. +21 −15 src/utils/templateBuilder.js
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: CI
on:
push:
branches:
35 changes: 24 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![MIT License][license-shield]](LICENSE)

<br />

@@ -16,6 +16,14 @@ As it uses a GitHub action it's secure and very easy to integrate into your proj

The contributors list is fetched from [GitHub API](https://developer.github.com/v3/repos/statistics/).

## Contributors Readme Action Table

Below image shows the contributors table generated by this action.

![contributors readme](./assets/contributors-table.png)

> You can take it even furthur by mixing it up with bots, custom users and more. Check out the [example](./contributors.md) provided.
## Getting Started

### First Step
@@ -32,27 +40,31 @@ jobs:
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contrib in readme
permissions:
contents: write
pull-requests: write
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.6
uses: akhilmhdh/contributors-readme-action@v2.3.10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
That's it!
To add it to your to your existing workflow, append this to your current `.yml` workflow script.
To add it to your existing workflow, **append** this to your current `.yml` workflow script.

```yml
- uses: akhilmhdh/contributors-readme-action@v2.3.6
# add required write permission
- uses: akhilmhdh/contributors-readme-action@v2.3.10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

### Second Step

1. Add a `README.md` file
2. Add the below comment inside your `README.md` where you want it to appear.
2. Add the below comment inside your `README.md` where you want it to **appear**.

```md
<!-- readme: contributors -start -->
@@ -63,7 +75,7 @@ To add it to your to your existing workflow, append this to your current `.yml`

### But wait!!!

- What if you wanted to add direct collaborators of a project, no worries
- What if you wanted to **add direct collaborators** of a project, no worries

```md
## Collaborators
@@ -77,7 +89,7 @@ To add it to your to your existing workflow, append this to your current `.yml`
<!-- readme: contributors -end -->
```

- Now you decided that you want to join this into one list, no issue
- Now you decided that you want to **join** this into one list, no issue

```md
## Contributors
@@ -86,13 +98,13 @@ To add it to your to your existing workflow, append this to your current `.yml`
<!-- readme: collaborators,contributors -end -->
```

- Then you decided to add some github users who are important figure in this project
- Then you decided to **add some github users** who are important figure in this project and want's to [**remove**](#operators) some users or bots, no worries

```md
## Contributors
<!-- readme: <username1>,collaborators,<username2>,contributors -start -->
<!-- readme: <username1>,collaborators,<username3>,contributors -end -->
<!-- readme: <username1>,collaborators,<username2>,contributors,<username3>/- -start -->
<!-- readme: <username1>,collaborators,<username3>,contributors,<username3>/- -end -->
```

> The order of the list will be given priority. So username1 will appear first collaborators then username2 likewise.(No brackets for usernames)
@@ -125,7 +137,8 @@ You can add these optional parameters in your action script to modify the appear

```yml
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.6
# add required write permission
uses: akhilmhdh/contributors-readme-action@v2.3.10
with:
image_size: 100
```
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ outputs:
pr_id: # id of pr
description: "Id of the generated PR when the branch is in protected mode"
runs:
using: "node12"
using: "node20"
main: "dist/index.js"
branding:
icon: "archive"
Binary file added assets/contributors-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
241 changes: 146 additions & 95 deletions contributors.md
Original file line number Diff line number Diff line change
@@ -6,114 +6,165 @@ This is an example of contributors-readme-action as it can't be utilized in mast

<!-- readme: contributors -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/akhilmhdh">
<img src="https://avatars.githubusercontent.com/u/31166322?v=4" width="100;" alt="akhilmhdh"/>
<br />
<sub><b>Akhil Mohan</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/MrChocolatine">
<img src="https://avatars.githubusercontent.com/u/47531779?v=4" width="100;" alt="MrChocolatine"/>
<br />
<sub><b>Max Z</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/matks">
<img src="https://avatars.githubusercontent.com/u/3830050?v=4" width="100;" alt="matks"/>
<br />
<sub><b>Mathieu Ferment</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/athul">
<img src="https://avatars.githubusercontent.com/u/40897573?v=4" width="100;" alt="athul"/>
<br />
<sub><b>Athul Cyriac Ajay</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/kachick">
<img src="https://avatars.githubusercontent.com/u/1180335?v=4" width="100;" alt="kachick"/>
<br />
<sub><b>Kenichi Kamiya</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/naomi-lgbt">
<img src="https://avatars.githubusercontent.com/u/63889819?v=4" width="100;" alt="naomi-lgbt"/>
<br />
<sub><b>Naomi Carrigan</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/shufo">
<img src="https://avatars.githubusercontent.com/u/1641039?v=4" width="100;" alt="shufo"/>
<br />
<sub><b>Shuhei Hayashibara</b></sub>
</a>
</td></tr>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/akhilmhdh">
<img src="https://avatars.githubusercontent.com/u/31166322?v=4" width="100;" alt="akhilmhdh"/>
<br />
<sub><b>Akhil Mohan</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/melroy89">
<img src="https://avatars.githubusercontent.com/u/628926?v=4" width="100;" alt="melroy89"/>
<br />
<sub><b>Melroy van den Berg</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/MrChocolatine">
<img src="https://avatars.githubusercontent.com/u/47531779?v=4" width="100;" alt="MrChocolatine"/>
<br />
<sub><b>Max Z</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/matks">
<img src="https://avatars.githubusercontent.com/u/3830050?v=4" width="100;" alt="matks"/>
<br />
<sub><b>Mathieu Ferment</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/athul">
<img src="https://avatars.githubusercontent.com/u/40897573?v=4" width="100;" alt="athul"/>
<br />
<sub><b>Athul Cyriac Ajay</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/dtcMLOps">
<img src="https://avatars.githubusercontent.com/u/115469901?v=4" width="100;" alt="dtcMLOps"/>
<br />
<sub><b>Daniel T</b></sub>
</a>
</td>
</tr>
<tr>
<td align="center">
<a href="https://github.com/jessebot">
<img src="https://avatars.githubusercontent.com/u/2389292?v=4" width="100;" alt="jessebot"/>
<br />
<sub><b>JesseBot</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/kachick">
<img src="https://avatars.githubusercontent.com/u/1180335?v=4" width="100;" alt="kachick"/>
<br />
<sub><b>Kenichi Kamiya</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/naomi-lgbt">
<img src="https://avatars.githubusercontent.com/u/63889819?v=4" width="100;" alt="naomi-lgbt"/>
<br />
<sub><b>Naomi Carrigan</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/KPCOFGS">
<img src="https://avatars.githubusercontent.com/u/100217654?v=4" width="100;" alt="KPCOFGS"/>
<br />
<sub><b>Shi Sheng</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/shufo">
<img src="https://avatars.githubusercontent.com/u/1641039?v=4" width="100;" alt="shufo"/>
<br />
<sub><b>Shuhei Hayashibara</b></sub>
</a>
</td>
</tr>
<tbody>
</table>
<!-- readme: contributors -end -->

## Feature Thank Away

<!-- readme: samslow,alandefreitas,atharwa-24,EmilStenstrom -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/samslow">
<img src="https://avatars1.githubusercontent.com/u/26738367?v=4" width="100;" alt="samslow"/>
<br />
<sub><b>Hyeonseok Samuel Seo</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/alandefreitas">
<img src="https://avatars0.githubusercontent.com/u/5369819?v=4" width="100;" alt="alandefreitas"/>
<br />
<sub><b>Alan De Freitas</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/atharwa-24">
<img src="https://avatars0.githubusercontent.com/u/54115798?v=4" width="100;" alt="atharwa-24"/>
<br />
<sub><b>Atharwa_24</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/emilstenstrom">
<img src="https://avatars.githubusercontent.com/u/224130?v=4" width="100;" alt="emilstenstrom"/>
<br />
<sub><b>Emil Stenström</b></sub>
</a>
</td></tr>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/samslow">
<img src="https://avatars1.githubusercontent.com/u/26738367?v=4" width="100;" alt="samslow"/>
<br />
<sub><b>Hyeonseok Samuel Seo</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/alandefreitas">
<img src="https://avatars0.githubusercontent.com/u/5369819?v=4" width="100;" alt="alandefreitas"/>
<br />
<sub><b>Alan De Freitas</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/atharwa-24">
<img src="https://avatars0.githubusercontent.com/u/54115798?v=4" width="100;" alt="atharwa-24"/>
<br />
<sub><b>Atharwa_24</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/emilstenstrom">
<img src="https://avatars.githubusercontent.com/u/224130?v=4" width="100;" alt="emilstenstrom"/>
<br />
<sub><b>Emil Stenström</b></sub>
</a>
</td>
</tr>
<tbody>
</table>
<!-- readme: samslow,alandefreitas,atharwa-24,EmilStenstrom -end -->

## Bots

<!-- readme: bots -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/github-actions[bot]">
<img src="https://avatars.githubusercontent.com/in/15368?v=4" width="100;" alt="github-actions[bot]"/>
<br />
<sub><b>github-actions[bot]</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/dependabot[bot]">
<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="100;" alt="dependabot[bot]"/>
<br />
<sub><b>dependabot[bot]</b></sub>
</a>
</td></tr>
<tbody>
<tr>
<td align="center">
<a href="https://github.com/github-actions[bot]">
<img src="https://avatars.githubusercontent.com/in/15368?v=4" width="100;" alt="github-actions[bot]"/>
<br />
<sub><b>github-actions[bot]</b></sub>
</a>
</td>

<td align="center">
<a href="https://github.com/dependabot[bot]">
<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="100;" alt="dependabot[bot]"/>
<br />
<sub><b>dependabot[bot]</b></sub>
</a>
</td>
</tr>
<tbody>
</table>
<!-- readme: bots -end -->
27,468 changes: 26,384 additions & 1,084 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions dist/licenses.txt
Original file line number Diff line number Diff line change
@@ -47,6 +47,28 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


@fastify/busboy
MIT
Copyright Brian White. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

@octokit/auth-token
MIT
The MIT License
@@ -575,6 +597,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


undici
MIT
MIT License

Copyright (c) Matteo Collina and Undici contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


universal-user-agent
ISC
# [ISC License](https://spdx.org/licenses/ISC)
@@ -586,6 +633,19 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


uuid
MIT
The MIT License (MIT)

Copyright (c) 2010-2020 Robert Kieffer and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


webidl-conversions
BSD-2-Clause
# The BSD 2-Clause License
2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

16,104 changes: 10,017 additions & 6,087 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "contribution-automation-action",
"version": "2.3.3",
"version": "2.3.7",
"description": "A github action to automate contributors section of a readme",
"main": "index.js",
"scripts": {
"lint": "eslint .",
"fix": "eslint --fix .",
"format": "prettier --write **/*.js",
"format-check": "prettier --check **/*.js",
"test": "jest --verbose",
@@ -22,16 +23,16 @@
},
"homepage": "https://github.com/akhilmhdh/contribution-automation-action#readme",
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.0",
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"nanoid": "^3.3.1"
},
"devDependencies": {
"@babel/preset-env": "^7.15.6",
"@vercel/ncc": "^0.31.1",
"@vercel/ncc": "^0.34.0",
"babel-jest": "^27.2.4",
"eslint": "^7.32.0",
"jest": "^27.2.4",
"prettier": "^2.4.1"
"eslint": "^8.25.0",
"jest": "^29.2.0",
"prettier": "^2.7.1"
}
}
4 changes: 0 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -9,10 +9,6 @@ import getOrgSponsorListQuery from './query/getOrgSponsorsList.gql';

async function run() {
try {
if (context.payload.action) {
if (context.payload.action !== 'closed') return;
}

// get various inputs applied in action.yml
const path = getInput('readme_path').trim();
const affiliation = getInput('collaborators').trim();
36 changes: 21 additions & 15 deletions src/utils/templateBuilder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import capitalize from './capitalize';
import stripDuplicates from './stripDuplicates';
import octokit from '../octokit';

@@ -7,13 +6,13 @@ import { htmlEncoding } from './htmlEncoding';

export const getTemplate = (userID, imageSize, name, avatarUrl) => {
return `
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
<td align="center">
<a href="https://github.com/${userID}">
<img src="${avatarUrl}" width="${imageSize};" alt="${userID}"/>
<br />
<sub><b>${name ? name : userID}</b></sub>
</a>
</td>`;
};

/**
@@ -31,15 +30,22 @@ export const getUserInfo = async (login, avatarUrl, prevContributors, useUserNam
const {
data: { name, avatar_url }
} = await octokit.rest.users.getByUsername({ username: login });
return { name: useUserName ? login : htmlEncoding(name), url: avatar_url };
// Use login (== username) when useUserName is true, otherwise try to use name.
// Unless name is null, then fallback to login.
const finalName = (useUserName) ? login: (name) ? htmlEncoding(name) : login
return { name: finalName, url: avatar_url };
} catch (error) {
console.log(`Oops...given github id ${login} is invalid :(`);
return { name: login, url: '' };
}
}

// Use login (== username) when useUserName is true, otherwise try to use name.
// If name is null, then fallback to login.
const finalName = (useUserName) ? login : (prevContributors[login] && prevContributors[login].name) ?
htmlEncoding(prevContributors[login].name) : login
return {
name: useUserName ? login : htmlEncoding(prevContributors[login].name),
name: finalName,
url: avatarUrl || prevContributors[login].url
};
};
@@ -57,14 +63,14 @@ const templateBuilder = async (contributors, prevContributors, type) => {
const useUsername = getBooleanInput('use_username');
const columns = Number(getInput('columns_per_row').trim());

let contributors_content = `<!-- readme:${type}-start -->\n<table>\n`;
let contributors_content = `<!-- readme:${type}-start -->\n<table>\n\t<tbody>\n`;

contributors = stripDuplicates(contributors, 'login');

const rows = Math.ceil(contributors.length / columns);

for (let row = 1; row <= rows; row++) {
contributors_content += '<tr>';
contributors_content += '\t\t<tr>';
for (
let column = 1;
column <= columns && (row - 1) * columns + column - 1 < contributors.length;
@@ -82,17 +88,17 @@ const templateBuilder = async (contributors, prevContributors, type) => {
contributors_content += getTemplate(
login,
imageSize,
useUsername ? name : capitalize(name),
name,
url
);
} else {
contributors_content += getTemplate(login, imageSize, login, avatar_url);
}
}
contributors_content += '</tr>\n';
contributors_content += '\n\t\t</tr>\n';
}

contributors_content += `</table>\n<!-- readme:${type}-end -->`;
contributors_content += `\t<tbody>\n</table>\n<!-- readme:${type}-end -->`;

return contributors_content;
};