Skip to content

Count organization repositories and stars on the profile widget#27

Open
eudanielhenrique wants to merge 1 commit into
Jurredr:masterfrom
eudanielhenrique:feat/profile-org-stats
Open

Count organization repositories and stars on the profile widget#27
eudanielhenrique wants to merge 1 commit into
Jurredr:masterfrom
eudanielhenrique:feat/profile-org-stats

Conversation

@eudanielhenrique

Copy link
Copy Markdown
Contributor

Closes #4.

Adds an opt-in &includeOrgs=true query param to the profile widget. When set, the repositories and stars data options also include public repositories (and their stargazer counts) from organizations the user is a member of, not just repos owned by their personal account. Off by default so existing embeds keep their current numbers.

Implementation notes:

  • The GraphQL query now uses variables ($login, $includeOrgs) instead of interpolating the username directly into the query string, and only fetches the organizations field when requested, via @include(if: $includeOrgs), to avoid the extra API cost when the flag isn't set.
  • Limited to the first 25 organizations and first 100 repositories per organization (no cursor pagination yet — same limit the existing personal repositories query already had). Only sees organizations and repos that are publicly visible to the server's token.

Checked off the corresponding TO-DO item in the README.

Test plan

  • npm run build compiles cleanly
  • Verified the compiled GraphQL query and merge logic by inspecting the emitted JS (no live GitHub token available in this environment to hit the real API end-to-end — would appreciate a smoke test against a real org-member account before merging)

Closes Jurredr#4.

Adds an opt-in &includeOrgs=true query param to the profile widget.
When set, the 'repositories' and 'stars' data options also include
public repositories (and their stargazer counts) from organizations
the user is a member of, not just repos owned by their personal
account. Off by default so existing embeds keep their current numbers.

Implementation notes:
- The GraphQL query now uses variables ($login, $includeOrgs) instead
  of interpolating the username directly into the query string, and
  only fetches the organizations field when requested, via
  @include(if: $includeOrgs), to avoid the extra API cost when the
  flag isn't set.
- Limited to the first 25 organizations and first 100 repositories per
  organization (no cursor pagination yet — same limit the existing
  personal repositories query already had). Only sees organizations
  and repos that are publicly visible to the server's token.
Copilot AI review requested due to automatic review settings July 14, 2026 12:43
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@eudanielhenrique is attempting to deploy a commit to the Jurre's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Taking organization statics into account

2 participants