Skip to content

Commit 11d96e7

Browse files
authored
chore(ci): exclude bot accounts from contributors list (#96)
1 parent 99292b0 commit 11d96e7

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
- '.github/ISSUE_TEMPLATE/**'
1212
- '.github/workflows/generate-changelog.yml'
1313
- '.github/workflows/preview-changelog.yml'
14+
- '.github/workflows/contributors.yml'
1415
- '.idea/**'
1516
- '.claude/**'
1617
- '.gitignore'
@@ -30,6 +31,7 @@ on:
3031
- '.github/ISSUE_TEMPLATE/**'
3132
- '.github/workflows/generate-changelog.yml'
3233
- '.github/workflows/preview-changelog.yml'
34+
- '.github/workflows/contributors.yml'
3335
- '.idea/**'
3436
- '.claude/**'
3537
- '.gitignore'

.github/workflows/contributors.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
env:
1818
GH_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
1919
run: |
20-
# Fetch contributors from GitHub API
21-
contributors=$(gh api repos/dtvem/dtvem/contributors --paginate --jq '.[] | "<a href=\"\(.html_url)\"><img src=\"\(.avatar_url)\" width=\"64\" height=\"64\" alt=\"\(.login)\"/></a>"')
20+
# Fetch contributors from GitHub API (exclude bots)
21+
contributors=$(gh api repos/dtvem/dtvem/contributors --paginate --jq '.[] | select(.type != "Bot") | select(.login | test("\\[bot\\]$") | not) | "<a href=\"\(.html_url)\"><img src=\"\(.avatar_url)\" width=\"64\" height=\"64\" alt=\"\(.login)\"/></a>"')
2222
2323
# Build the contributors section
2424
contrib_section="<!-- readme: contributors -start -->

0 commit comments

Comments
 (0)