From 7b33b622dbd7ee58e8566b80c6a7ae4d0817b8d2 Mon Sep 17 00:00:00 2001 From: BigMoby Date: Mon, 1 Jul 2024 16:31:30 +0200 Subject: [PATCH] chore: Update update-authors.sh script (#57) * chore: update update-authors.sh script * chore: update update-authors.sh script --- .github/workflows/authors.yaml | 10 ++++++++-- AUTHORS.md | 9 +++++---- tools/update-authors.sh | 23 ++++++++++++++++------- 3 files changed, 29 insertions(+), 13 deletions(-) mode change 100644 => 100755 tools/update-authors.sh diff --git a/.github/workflows/authors.yaml b/.github/workflows/authors.yaml index 9c457a44..f511f03f 100644 --- a/.github/workflows/authors.yaml +++ b/.github/workflows/authors.yaml @@ -7,9 +7,15 @@ jobs: update-authors: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Run update-authors.sh script file run: | chmod +x ./tools/update-authors.sh ./tools/update-authors.sh - shell: bash \ No newline at end of file + shell: bash + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Update AUTHORS.md file + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md index b48da5b9..c6171f08 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -9,17 +9,16 @@ radicalbit-ai-monitoring is developed and maintained by a community of people in

- +

-Contributors (ordered by first contribution.) +Contributors (ordered by first contribution.) ------------------------------------- [Full List of Contributors](https://github.com/radicalbit/radicalbit-ai-monitoring/graphs/contributors) - Paolo Filippelli () - Roberto Bentivoglio () -- paoloyx () - Luca Tagliabue (<32895300+lucataglia@users.noreply.github.com>) - Mauro Cortellazzi () - Stefano Zamboni (<39366866+SteZamboni@users.noreply.github.com>) @@ -29,6 +28,8 @@ Contributors (ordered by first contribution.) - Daniele Tria (<36860433+dtria91@users.noreply.github.com>) - rivamarco () - d-croci () -- bigmoby () +- cybermarinella () +- rivamarco () +- BigMoby () #### Generated by tools/update-authors.sh. diff --git a/tools/update-authors.sh b/tools/update-authors.sh old mode 100644 new mode 100755 index 4063a4c5..02169a8c --- a/tools/update-authors.sh +++ b/tools/update-authors.sh @@ -1,15 +1,24 @@ #!/bin/sh -#Update AUTHORS.md based on git history. +# Update AUTHORS.md based on git history. git log --reverse --format='%aN (<%aE>)' | perl -we ' BEGIN { - %seen = (), @authors = (); + %seen_emails = (); } while (<>) { - next if $seen{$_}; + my $line = $_; next if /(dependabot\[bot\])/; next if /(devops\@radicalbit.ai)/; - $seen{$_} = push @authors, "- ", $_; + next if /(devops\@users.noreply.github.com)/; + + # Extract the email + if ($line =~ /<(.+?)>/) { + my $email = $1; + # Skip if the email has been seen + next if $seen_emails{$email}++; + } + + push @authors, "- ", $line; } END { print "