diff --git a/.github/workflows/authors.yaml b/.github/workflows/authors.yaml deleted file mode 100644 index fc3148d8..00000000 --- a/.github/workflows/authors.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Update Authors -on: - push: - branches: - - main -jobs: - update-authors: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - name: Run update-authors.sh script file - run: | - chmod +x ./tools/update-authors.sh - ./tools/update-authors.sh - shell: bash - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_user_name: devops-radicalbit - commit_user_email: devops@radicalbit.ai - commit_author: devops-radicalbit - 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 c6171f08..1735da8e 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -29,7 +29,6 @@ Contributors (ordered by first contribution.) - rivamarco () - d-croci () - cybermarinella () -- rivamarco () - BigMoby () #### Generated by tools/update-authors.sh. diff --git a/tools/update-authors.sh b/tools/update-authors.sh index 02169a8c..851c8b4e 100755 --- a/tools/update-authors.sh +++ b/tools/update-authors.sh @@ -3,6 +3,7 @@ git log --reverse --format='%aN (<%aE>)' | perl -we ' BEGIN { + %seen_names = (); %seen_emails = (); } while (<>) { @@ -11,10 +12,12 @@ while (<>) { next if /(devops\@radicalbit.ai)/; next if /(devops\@users.noreply.github.com)/; - # Extract the email - if ($line =~ /<(.+?)>/) { - my $email = $1; - # Skip if the email has been seen + # Extract the name before the email and convert to lowercase + if ($line =~ /^(.+?) \((.+)\)$/) { + my $name = lc($1); + my $email = $2; + # Skip if the name or email has been seen (case insensitive for name) + next if $seen_names{$name}++; next if $seen_emails{$email}++; }