Skip to content

Commit

Permalink
Update GitHub Actions workflow for contributors handling
Browse files Browse the repository at this point in the history
- Renamed job from 'build' to 'update'.
- Updated step in 'update' job to include an empty line before adding contributors.
- Changed the output format to append HTML URLs to the list.

Signed-off-by: urasakikeisuke <[email protected]>
  • Loading branch information
urasakikeisuke committed May 15, 2024
1 parent dfba204 commit e76b144
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/update-contributors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
build:
update:
runs-on: ubuntu-latest

steps:
Expand All @@ -21,11 +21,12 @@ jobs:
- name: Update CONTRIBUTORS.md
run: |
echo "# Contributors" > CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
p=1
while true; do
s=$(curl "https://api.github.com/repos/mapiv/pypcd4/contributors?page=$p") || break
[ "0" = $(echo $s | jq length) ] && break
echo $s | jq -r '.[] | "* " + .login + ""'
echo $s | jq -r '.[] | "* [" + .login + "](" + .html_url + ")"';
p=$((p+1))
done | sort -f | tee -a CONTRIBUTORS.md
Expand Down

0 comments on commit e76b144

Please sign in to comment.