From b8389e88543641e842534aa7949fa467ea13f128 Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Wed, 3 Jun 2026 14:17:48 +0530 Subject: [PATCH 1/6] Dynamic contributor wall - Applied the specified contributor design. - Applied marked down table for contributors display. - Auto contributor updation --- .github/scripts/build-contributor-wall.py | 59 +++++++++++++++++++++++ .github/workflows/contributor-wall.yml | 41 ++++++++++++++++ README.md | 32 ++++++++++-- 3 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 .github/scripts/build-contributor-wall.py create mode 100644 .github/workflows/contributor-wall.yml diff --git a/.github/scripts/build-contributor-wall.py b/.github/scripts/build-contributor-wall.py new file mode 100644 index 0000000..6a8dfcc --- /dev/null +++ b/.github/scripts/build-contributor-wall.py @@ -0,0 +1,59 @@ +import json +import re +from pathlib import Path + +README = Path("README.md") + +# load contributors data from file +contributors = json.loads( + Path("/tmp/contributors.json").read_text(encoding="utf-8") +) + +cards = [] + +# It creates card for each contibutor +for c in contributors: + cards.append( + f''' + +{c[
+{c["login"]}
+{c["contributions"]} commits +
+''' + ) + +rows = [] + +# It creates rows of 12 cards each +for i in range(0, len(cards), 12): + rows.append("" + "".join(cards[i:i+12]) + "") + +wall = f""" +
+ +### {len(contributors)} Contributors + + +{''.join(rows)} +
+ +*Auto-updated daily · View all →* # noqa: E501 + +
+""" + +# read the content of README.md +content = README.read_text(encoding="utf-8") + +# replace the content with new contribotr wall between markers +content = re.sub( + r".*?", + f"\n{wall}\n", + content, + flags=re.S, +) + +# Write the updated content back to README.md +README.write_text(content, encoding="utf-8") diff --git a/.github/workflows/contributor-wall.yml b/.github/workflows/contributor-wall.yml new file mode 100644 index 0000000..369d8f5 --- /dev/null +++ b/.github/workflows/contributor-wall.yml @@ -0,0 +1,41 @@ +name: Update Contributor Wall + +on: + push: + branches: [main] + schedule: + - cron: "0 2 * * *" + workflow_dispatch: + +concurrency: + group: contributor-wall + cancel-in-progress: false + +jobs: + update-wall: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Fetch contributors + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api "repos/${{ github.repository }}/contributors?per_page=100" \ + --paginate \ + | jq -s 'add | map(select(.type != "Bot"))' \ + > /tmp/contributors.json + + - name: Build wall + run: python ./.github/scripts/build-contributor-wall.py + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "chore: update contributor wall [skip ci]" + file_pattern: README.md \ No newline at end of file diff --git a/README.md b/README.md index d4cf677..ba7c145 100644 --- a/README.md +++ b/README.md @@ -81,13 +81,35 @@ If you're reading this and thinking ## Contributors -A huge thanks to the legends who decided to waste their CPU cycles on this: +## 🏆 Contributors - - - +Everyone who has helped prove that **1 is still 1**. -*Click on any contributor's avatar above to visit their GitHub profile. New contributors are automatically added here!* +This wall regenerates automatically whenever contributions are merged. + + +
+ +### 0 Contributors + + + + + +
+ + itsdakshjain +
+ itsdakshjain +
+ Maintainer +
+
+ +*Auto-updated daily · View all contributors on GitHub* + +
+ ## The "Serious" Engineering Side From deaaa2321ce6d4a7a4049c18f31267cba9f9b6b2 Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Wed, 3 Jun 2026 15:14:20 +0530 Subject: [PATCH 2/6] Format branches section in contributor-wall.yml Signed-off-by: AdarshSingh-25 --- .github/workflows/contributor-wall.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/contributor-wall.yml b/.github/workflows/contributor-wall.yml index 369d8f5..afbc067 100644 --- a/.github/workflows/contributor-wall.yml +++ b/.github/workflows/contributor-wall.yml @@ -2,9 +2,12 @@ name: Update Contributor Wall on: push: - branches: [main] + branches: + - main + schedule: - cron: "0 2 * * *" + workflow_dispatch: concurrency: @@ -38,4 +41,4 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "chore: update contributor wall [skip ci]" - file_pattern: README.md \ No newline at end of file + file_pattern: README.md From 1f74bcc244a6c7272c6f8189c5d7e8bb180b6080 Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Wed, 3 Jun 2026 15:21:04 +0530 Subject: [PATCH 3/6] Remove auto-update notice from README Removed auto-update notice for contributors. Signed-off-by: AdarshSingh-25 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ba7c145..cffe057 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,6 @@ This wall regenerates automatically whenever contributions are merged. -*Auto-updated daily · View all contributors on GitHub* - From d30c003d066124c197ef76b77e5c780a0463c671 Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Thu, 4 Jun 2026 11:12:28 +0530 Subject: [PATCH 4/6] changed the visual to grid flow --- .github/scripts/build-contributor-wall.py | 44 +++++++++++------------ .github/workflows/contributor-wall.yml | 2 +- README.md | 20 +++++------ 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/scripts/build-contributor-wall.py b/.github/scripts/build-contributor-wall.py index 6a8dfcc..1c24e26 100644 --- a/.github/scripts/build-contributor-wall.py +++ b/.github/scripts/build-contributor-wall.py @@ -4,50 +4,48 @@ README = Path("README.md") -# load contributors data from file +# Load contributors from the files contributors = json.loads( Path("/tmp/contributors.json").read_text(encoding="utf-8") ) cards = [] -# It creates card for each contibutor +# It create one contributor card for c in contributors: cards.append( - f''' - -{c[
-{c["login"]}
-{c["contributions"]} commits -
-''' + f""" + + {c['login']} +
+ {c['login']} +
+ """ ) -rows = [] - -# It creates rows of 12 cards each -for i in range(0, len(cards), 12): - rows.append("" + "".join(cards[i:i+12]) + "") - +# Build contributor wall wall = f"""
### {len(contributors)} Contributors - -{''.join(rows)} -
+{"\n".join(cards)} -*Auto-updated daily · View all →* # noqa: E501 +*Auto-updated daily · View all →*
""" -# read the content of README.md +# Read README content = README.read_text(encoding="utf-8") -# replace the content with new contribotr wall between markers +# Replace everything between the markers content = re.sub( r".*?", f"\n{wall}\n", @@ -55,5 +53,5 @@ flags=re.S, ) -# Write the updated content back to README.md +# Write updated README README.write_text(content, encoding="utf-8") diff --git a/.github/workflows/contributor-wall.yml b/.github/workflows/contributor-wall.yml index afbc067..906b0b6 100644 --- a/.github/workflows/contributor-wall.yml +++ b/.github/workflows/contributor-wall.yml @@ -29,7 +29,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh api "repos/${{ github.repository }}/contributors?per_page=100" \ + gh api "repos/${{ github.repository }}/contributors" \ --paginate \ | jq -s 'add | map(select(.type != "Bot"))' \ > /tmp/contributors.json diff --git a/README.md b/README.md index cffe057..1786ade 100644 --- a/README.md +++ b/README.md @@ -90,21 +90,17 @@ This wall regenerates automatically whenever contributions are merged.
-### 0 Contributors +### Contributors - - - - -
+

- itsdakshjain -
- itsdakshjain -
- Maintainer + itsdakshjain
-

+

From 0e1c43bc6927b5d68808465c01e06d98ac3ca686 Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Thu, 4 Jun 2026 11:58:19 +0530 Subject: [PATCH 5/6] Update build-contributor-wall.py Signed-off-by: AdarshSingh-25 --- .github/scripts/build-contributor-wall.py | 36 +++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/scripts/build-contributor-wall.py b/.github/scripts/build-contributor-wall.py index 1c24e26..96642c1 100644 --- a/.github/scripts/build-contributor-wall.py +++ b/.github/scripts/build-contributor-wall.py @@ -14,20 +14,19 @@ # It create one contributor card for c in contributors: cards.append( - f""" - - {c['login']} -
- {c['login']} -
- """ - ) + f""" + + {c['login']}
+ {c['login']}
+ {c['contributions']} commits +
+""" +) # Build contributor wall wall = f""" @@ -35,9 +34,14 @@ ### {len(contributors)} Contributors -{"\n".join(cards)} +

+{"".join(cards)} +

-*Auto-updated daily · View all →* +*Auto-updated daily · + +View all → +* """ From ff462a5eb08e8404a452d67e7097e1c153753c5a Mon Sep 17 00:00:00 2001 From: AdarshSingh-25 Date: Thu, 4 Jun 2026 12:16:34 +0530 Subject: [PATCH 6/6] Update build-contributor-wall.py Signed-off-by: AdarshSingh-25 --- .github/scripts/build-contributor-wall.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/scripts/build-contributor-wall.py b/.github/scripts/build-contributor-wall.py index 96642c1..f6767f4 100644 --- a/.github/scripts/build-contributor-wall.py +++ b/.github/scripts/build-contributor-wall.py @@ -13,18 +13,19 @@ # It create one contributor card for c in contributors: - cards.append( + cards.append( f""" - - {c['login']}
- {c['login']}
- {c['contributions']} commits + +
+{c['login']} +
+{c['login']}
+ +   """ )