Skip to content

Count main branch commit contributors on the website - #1689

Open
Cedric Vidal (cedricvidal) wants to merge 3 commits into
mainfrom
cedricvidal-count-imported-contributor-prs
Open

Cedric Vidal (cedricvidal) wants to merge 3 commits into
mainfrom
cedricvidal-count-imported-contributor-prs

Conversation

@cedricvidal

@cedricvidal Cedric Vidal (cedricvidal) commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The contributor wall counted only pull requests merged natively in microsoft/scope, so historical work imported from scope-core as issues was absent. This changes the source of truth to GitHub's repository contributors endpoint and presents the metric explicitly as commits attributed on the default branch (main).

The publisher filters anonymous and bot accounts, emits deterministic JSONL, and includes a temporary prs compatibility alias so the independently deployed website reader and website-data branch can roll forward without an empty state. The browser accepts both new and legacy records. Contributor cards continue to open merged-PR searches, with copy clarifying that the displayed number is commits on main.

The PR also documents a pinact exception for dtolnay/rust-toolchain, whose toolchain-specific commits have no matching Git tags. The workflow retains full-SHA and explanatory-comment enforcement while allowing CI to verify the rest of the action pins.

Demos

The same homepage contributor widget is shown with deterministic contributor data from each counting method.

Before

The native merged-PR query reports 77 PRs and omits the imported scope-core history.

Contributor widget before, showing 13 contributors and 77 merged PRs

After

The repository contributor query reports 644 commits attributed on main, including the imported history.

Contributor widget after, showing 13 contributors and 644 commits on main

Testing

All commands passed. The pnpm commands were invoked through the cached pnpm 10.29.1 launcher because the machine's default Corepack shim referenced a broken Homebrew Node installation.

  • pnpm --dir website test - 21 tests passed.
  • pnpm exec vitest run scripts/ci-workflow.test.ts - 37 tests passed.
  • SITE=https://microsoft.github.io BASE_PATH=/scope pnpm --dir website run build - production build passed.
  • BASE_PATH=/scope playwright test --config website/playwright.config.ts - 92 tests passed across light/dark and desktop/mobile projects.
  • pinact --config .github/pinact.yaml run --fix=false --verify - passed.
  • pinact run --check --verify-comment - passed.
  • Live gh api repos/microsoft/scope/contributors transformation check - 13 non-bot user contributors, 644 total commits on the repository's default branch, and matching compatibility aliases.

Documentation and compatibility

Updated the website contributor documentation, README, Contributors page, development sample, and runtime copy to identify the metric as commits attributed on main.

The JSONL publisher now emits commits plus a temporary equal-valued prs alias. The browser prefers commits and continues to accept legacy prs-only records, avoiding a breaking transition between the Pages deployment and the independently updated website-data branch.

Checklist

  • If Portal features changed, keep CLI capabilities in sync. (N/A: website only.)
  • If Portal components changed, update their Storybook stories. (N/A: no Portal components.)
  • If database changes require a migration, include up() / down() and keep it CosmosDB-compatible. (N/A: no database changes.)
  • If dependencies changed, update the lockfile and regenerate NOTICE / NOTICE-REVIEW.txt with pnpm notice as needed. (N/A: no dependency changes.)
  • Video showing the behavior before the suggested change (N/A: count/copy-only website change.)
  • Video showing the behavior after the suggested change (N/A: count/copy-only website change.)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added type: documentation Documentation additions, corrections, and improvements. area: cicd Build, test, release, and deployment pipelines. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. labels Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #608

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3342 3342 0 0 0 0 0 1m33s

🎉 All tests passed!

Github Test Reporter

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@cedricvidal Cedric Vidal (cedricvidal) changed the title Count commit contributors on the website Count main branch commit contributors on the website Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #609

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3342 3342 0 0 0 0 0 1m12s

🎉 All tests passed!

Github Test Reporter

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Test Results (Node.js 22)

test: Run #610

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
3342 3342 0 0 0 0 0 1m11s

🎉 All tests passed!

Github Test Reporter

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cicd Build, test, release, and deployment pipelines. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. type: documentation Documentation additions, corrections, and improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant