Skip to content

Add @SufeyifanWu as a contributor #7

Add @SufeyifanWu as a contributor

Add @SufeyifanWu as a contributor #7

Workflow file for this run

name: Update Contributors
on:
schedule:
- cron: '0 0 * * 1' # Runs every Monday at 00:00 UTC
push:
paths:
- 'README.md'
- '.all-contributorsrc'
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install All Contributors CLI
run: npm install -g all-contributors-cli
- name: Add Contributors
run: |
# Extract unique GitHub usernames from commit history
CONTRIBUTORS=$(git log --format='%aN <%aE>' | sort -u | awk '{print $1}' | sed 's/<//;s/>//')
for contributor in $CONTRIBUTORS; do
# Add each contributor with the 'code' contribution type
all-contributors add $contributor code || echo "Contributor $contributor already exists."
done
- name: Generate Contributors Section
run: all-contributors generate
- name: Commit and Push Changes
run: |
git config --local user.name "GitHub Action"
git config --local user.email "action@github.com"
git add README.md .all-contributorsrc
git commit -m "chore: update contributors list" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}