Repository navigation
feat(website): add contributors page - #9439
Conversation
Add /community/contributors and a page per contributor at /community/contributors/<login>/, as discussed in apache#9380. - `pnpm contributors` gathers the data into website/.cache/contributors/: commits (with co-authors), reviews on merged pull requests, issues and discussions from the GitHub API, release attribution from git tags, and the contributors' pictures, which are served with the site. Fetches are incremental; without a token it builds from the cache, and a failed fetch never fails the build. - plugins/contributors-plugin.js adds the routes from that data. Without it, the landing page is still built and says there is no data. - The landing page shows a turning ring of cards picked at random, search, and browsing by first letter. Nothing is ranked. - A contributor's page has their card (it turns over), a contribution wall, a release ribbon, their changelog by release, and their reviews, issues and discussions. - The website workflows run the fetch step with the workflow token and cache its output, one cache entry a day. - Tests cover commit parsing, scope mapping, release tags, titles, exclusions, attribution on a small git repository, and the routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xuanwo
left a comment
There was a problem hiding this comment.
AI-generated review.
-
Paginate commit authors and PR reviewers. In an offline fixture with 11 distinct authors on one commit, only 10 received credit. With 11 distinct reviewers on one merged PR, only 10 reached the cache, which was marked complete. Both nested queries stop at
first: 10. OpenDAL’s Swift squash in #7216 has more than tenCo-authored-bytrailers. Please follow both nested connections through their last page and make sure previously truncated cache entries can be rebuilt. Commit query · Review query -
Keep published card numbers stable as required by #9380. The generator assigns each card its current position in first-contribution order. In the fixture, a review first counted when its PR merged, but its submission date placed the reviewer ahead of an existing contributor. That contributor’s card changed from 2 to 3. Please preserve the number already published when newly eligible activity changes the ordering. Review date · Card numbering
-
Publish avatars only for included contributors. Generating the page once, adding the contributor to
exclude, and generating it again removed their card but left their old PNG in the directory Docusaurus publishes. Please make the next build remove an opted-out contributor’s avatar from the published files as well. Avatar generation · Published directory -
Keep serving the last complete activity snapshot until the refresh finishes. In the offline fixture, GitHub reported another page with
rateLimit.remaining = 29. The refresh overwrote the complete cache with an incomplete one, so the generator skipped activity. Docusaurus then built only 3 of the previous 683 profiles, dropping everyone credited solely for reviews, issues, or discussions. A transport error preserved all 683. The commit-only fallback is fine when no complete snapshot exists. Refresh logic · Generator
|
One more thing, can you give a preview on how it looks like along with existing opendal pages? |
Address review on the contributors page: - Read a commit's authors and a pull request's reviews to their last page (they stopped at ten). The caches now carry a version; one written before this is read again from the start, so truncated entries are rebuilt. - Keep published card numbers. The numbering is saved with the cache and published as /community/contributors/numbers.json, which a build reads back if its cache is gone. Existing numbers never change; newcomers are numbered after everyone numbered before; an opted-out person's number is not given again and their login is not kept. - Remove an opted-out person's picture from the published pictures: the folder holds exactly the pictures of the people with a card. - When an activity refresh stops part-way (API budget), keep the last finished snapshot's cut-off and completeness, so the page goes on crediting reviews, issues and discussions. - Read up to 100 labels per issue (was 10) when leaving out duplicates. Tests for each, offline, with GitHub mocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…new page Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xuanwo
left a comment
There was a problem hiding this comment.
AI-generated review of 9013daf67a. The fixtures confirm that legacy caches are rescanned and nested pagination retrieves the 101st author and review. Opting out removes the contributor’s card, avatar and avatar index entry while preserving the other contributor’s number and image.
- A redeploy can reassign a published card number.
lastNumbers()prefers the local file, and the daily Actions cache is immutable. In the fixture, one deploy published Bob as #2. Restoring the earlier cache that day gave #2 to Carol and moved Bob to #3. Using the latest published table preserved Bob’s number. Production deploys should allocate from the last published table and stop if an existing table cannot be read. Number lookup · Deploy cache - An interrupted refresh can publish a mix of old and new activity. The fixture marked a reporter’s only issue as
DUPLICATE, then hit the rate-limit cutoff before the next page. The saved activity still hadcomplete: trueand its old timestamp, yet the generated page dropped the reporter’s card. Keeping the last completed snapshot available to the generator until the whole refresh succeeds would apply that reclassification at the right time. Refresh and save · Snapshot selection - A valid contributor ID can produce a card without a number. In the fixture, the lowercased ID of an unlinked Git author named
Constructorcollides with an inherited property onkept. The lookup skips allocation and the serialized card omitsno. CheckingObject.hasOwn(kept, id)would give that contributor a number. Number assignment
CI finished with 15 successful checks and 10 skipped, including a passing SITE BUILD. Could you share the requested preview of this PR’s Contributors page alongside the existing site pages? The linked prototype omits the site navigation. Preview request · Prototype
Address the second review of the contributors page:
- Number newcomers after the table published on the live site
(/community/contributors/numbers.json), not after the build cache, which
is saved once a day and can be older than the last deploy. The cached
table is only a fallback, used before anything is published or, outside
a deploy, when the site can't be read. The deploy in docs.yml sets
OPENDAL_CONTRIBUTORS_STRICT=true and stops instead: when the published
table exists but can't be read, when there is no data, or when making it
fails. Numbering moves to numbers.mjs.
- Replace the activity snapshot only when a refresh finishes. A refresh
works on a copy; if it stops part-way the copy is dropped, so changes
(an issue marked duplicate, say) apply together with the rest of the
refresh.
- Keep ids that clash with inherited object properties ("constructor")
numbered, and their pictures looked up correctly.
Tests for each, offline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pache/opendal#9439) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks! Fixed in 7a5322e, each with an offline test that fails on 9013daf:
Note: the cache format changed in c49b117, so the first run after this re-reads everything from GitHub once (about 5 minutes here). Here's how it looks inside the current site, built from this branch.
The Community page's Contributors section now points here too, and there's a "Contributors" link at the bottom of the Community sidebar. Drafted with AI assistance (Claude Code, Claude Opus 5.5) and reviewed by me. |
|
One question: these pages are full-width like /services, so there's no Community sidebar, and the landing page has no breadcrumb either. Right now the only way back to the Community docs is the navbar. Is that OK, or would you rather have them inside the Community docs with the sidebar? I'd just add a breadcrumb and highlight Community in the navbar, but either works for me. |
|
Thanks for merging! It should go live with the next docs deploy. |
* fix(website): contributors page follow-ups Follow-ups to the contributors page (#9439): - Take an account's name and picture from its newest commit or activity; the oldest cached entry used to win, so a renamed account kept its old name. Pictures are checked again once a week (If-None-Match), so a changed picture shows up. - Give people without a GitHub account ids that start with "~" ("~zhang-san"). A bare slug could be a GitHub login (an unlinked "John Smith" landed on user john-smith's card), and a name with no letters or digits got an empty id, the landing page's own route. Numbers published under the old ids carry over. - Leaving someone out by name now drops all their ids from the numbering too, not just their card. - Read history and activity again in full once a week, so deleted issues drop out and commits whose author has since linked their email are credited to the account. - Retry requests whose connection drops. - Don't crash on a malformed URL fragment ("#100%"). - Don't underline links on hover inside these pages. - Add the Community / Contributors breadcrumb to the landing page, and highlight Community in the navbar on these pages. - Run git with LC_ALL=C when reading gh-pages, so its messages (and the test that reads them) don't depend on the machine's language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(website): fetch a contributor picture only when its URL changes GitHub's avatar URLs carry a fingerprint of the picture (?u=...), so a new picture comes with a new URL. Now that names and pictures come from the newest data, a changed picture arrives as a new URL and is fetched then; checking every picture again each week isn't needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>


Which issue does this PR close?
Closes #9438.
Rationale for this change
Agreed in #9380: a page that credits everyone who has contributed to OpenDAL (commits, reviews, issues and discussions) without ranking anyone.
What changes are included in this PR?
website/scripts/contributors/:pnpm contributorsreads commits (with co-authors), reviews on merged PRs, issues and discussions from the GitHub GraphQL API intowebsite/.cache/contributors/. It credits each commit to the first release tag that contains it, and downloads the avatars, so the pages make no third-party requests. Later runs fetch only what changed. Without a token it builds from the cache, and a failed fetch never fails the build.website/plugins/contributors-plugin.jsadds/community/contributorsand/community/contributors/<login>/from that data. Without data, the landing page is still built and says so.website/src/components/contributors/holds the two pages. The text renders on the server. The card (a canvas), the ring, the wall and the lists are plain DOM code, mounted inuseEffectand cleaned up on navigation. The styles use the site's--odl-*tokens and are scoped under.odl-contributors.actions/cacheentry for the data.Notes for review:
excludeinconfig.mjs; everyone else's numbers stay the same. The page asks people to open an issue for this.--odl-fg-subtleand the breadcrumb grey are a step darker inside these pages, so small text meets WCAG AA.Are there any user-facing changes?
Yes: a new Contributors page under Community, linked from the Community sidebar and the Community page. Nothing else changes.
Breaking changes
AI Usage Statement
Checks run locally (macOS, Node 22.23;
website/.node-versionasks for 24.17):pnpm test: 11 tests pass (3 existing, 8 new).pnpm build: passes, both with and without the contributor data.typos: passes.hawkeye. The new files carry the same license header as the existing ones.🤖 Generated with Claude Code