Skip to content

Conversation

@h3xxit
Copy link
Member

@h3xxit h3xxit commented Sep 3, 2025

Summary by cubic

Adds a Hall of Fame page that ranks contributors across the org by recent activity and updates automatically. Includes a GitHub Action, data-fetch script, UI, and docs, with links in the navbar and About page.

  • New Features

    • New Hall of Fame at /hall-of-fame with a leaderboard UI and badges.
    • Ranks by a simplified recent-activity score (weighted commits in the last 6 months) across all org repos.
    • Data fetched via scripts/fetch-contributors.js → src/data/contributors.json, with optional manual entries in src/data/contributors-manual.json.
    • GitHub Action runs daily at 6 AM UTC (and on demand) to refresh data and auto-commit if changed.
    • Added nav item and About page link; new docs page (hall-of-fame-docs.md).
    • package.json adds fetch-contributors and build:fast scripts; added types and JSON module declarations.
  • Migration

    • No changes required. For local refresh: npm run fetch-contributors (set GITHUB_TOKEN to avoid rate limits).

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

24 issues found across 12 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

// Get recent commits (last 6 months) for recency calculation
const sixMonthsAgo = new Date();
sixMonthsAgo.setMonth(sixMonthsAgo.getMonth() - 6);
const commits = await githubApi(`/repos/${ORG_NAME}/${repoName}/commits?author=${username}&since=${sixMonthsAgo.toISOString()}&per_page=100`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Commit activity is not paginated; counts and lastActivity can be truncated for users with >100 recent commits.

Prompt for AI agents
Address the following comment on scripts/fetch-contributors.js at line 61:

<comment>Commit activity is not paginated; counts and lastActivity can be truncated for users with &gt;100 recent commits.</comment>

<file context>
@@ -0,0 +1,340 @@
+    // Get recent commits (last 6 months) for recency calculation
+    const sixMonthsAgo = new Date();
+    sixMonthsAgo.setMonth(sixMonthsAgo.getMonth() - 6);
+    const commits = await githubApi(`/repos/${ORG_NAME}/${repoName}/commits?author=${username}&amp;since=${sixMonthsAgo.toISOString()}&amp;per_page=100`);
+    
+    // Get PR reviews by this user
</file context>


const fetchContributorsForRepo = async (repoName) => {
try {
const contributors = await githubApi(`/repos/${ORG_NAME}/${repoName}/contributors?per_page=100`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Contributors list is not paginated; results are limited to 100 per repository, causing missing contributors.

Prompt for AI agents
Address the following comment on scripts/fetch-contributors.js at line 42:

<comment>Contributors list is not paginated; results are limited to 100 per repository, causing missing contributors.</comment>

<file context>
@@ -0,0 +1,340 @@
+
+const fetchContributorsForRepo = async (repoName) =&gt; {
+  try {
+    const contributors = await githubApi(`/repos/${ORG_NAME}/${repoName}/contributors?per_page=100`);
+    return contributors.map(contributor =&gt; ({
+      ...contributor,
</file context>

@@ -0,0 +1,65 @@
name: Update Contributors Data
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing explicit permissions; declare permissions: contents: write to ensure push can succeed and follow least-privilege.

Prompt for AI agents
Address the following comment on .github/workflows/update-contributors.yml at line 1:

<comment>Missing explicit permissions; declare permissions: contents: write to ensure push can succeed and follow least-privilege.</comment>

<file context>
@@ -0,0 +1,65 @@
+name: Update Contributors Data
+
+on:
</file context>

contributors: GitHubContributor[];
}

export interface DisplayContributor {
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent naming (snake_case and camelCase) within DisplayContributor increases cognitive load and mapping errors; use a consistent convention per interface (preferably snake_case for API-shaped data or camelCase for UI models) and rename fields accordingly.

Prompt for AI agents
Address the following comment on src/types/contributors.ts at line 39:

<comment>Inconsistent naming (snake_case and camelCase) within DisplayContributor increases cognitive load and mapping errors; use a consistent convention per interface (preferably snake_case for API-shaped data or camelCase for UI models) and rename fields accordingly.</comment>

<file context>
@@ -0,0 +1,60 @@
+  contributors: GitHubContributor[];
+}
+
+export interface DisplayContributor {
+  id: number;
+  name: string;
</file context>

export interface DisplayContributor {
id: number;
name: string;
username: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Having both username and githubUsername is redundant and ambiguous; consolidate to a single, clearly named field aligned with the source data (e.g., login) to avoid confusion and mapping errors.

Prompt for AI agents
Address the following comment on src/types/contributors.ts at line 42:

<comment>Having both username and githubUsername is redundant and ambiguous; consolidate to a single, clearly named field aligned with the source data (e.g., login) to avoid confusion and mapping errors.</comment>

<file context>
@@ -0,0 +1,60 @@
+export interface DisplayContributor {
+  id: number;
+  name: string;
+  username: string;
+  githubUsername: string;
+  role: string;
</file context>

total_contributions: number;
total_impact_score: number;
total_recent_activity: number;
scoring_method: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Narrow scoring_method to the known literal value to improve type safety and prevent accidental misspellings.

Prompt for AI agents
Address the following comment on src/types/contributors.ts at line 35:

<comment>Narrow scoring_method to the known literal value to improve type safety and prevent accidental misspellings.</comment>

<file context>
@@ -0,0 +1,60 @@
+  total_contributions: number;
+  total_impact_score: number;
+  total_recent_activity: number;
+  scoring_method: string;
+  contributors: GitHubContributor[];
+}
</file context>

username: string;
githubUsername: string;
role: string;
status: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Constrain status to a union of documented values to improve type safety and prevent invalid states.

Prompt for AI agents
Address the following comment on src/types/contributors.ts at line 45:

<comment>Constrain status to a union of documented values to improve type safety and prevent invalid states.</comment>

<file context>
@@ -0,0 +1,60 @@
+  username: string;
+  githubUsername: string;
+  role: string;
+  status: string;
+  contributions: number;
+  impact_score: number;
</file context>

h3xxit and others added 2 commits September 3, 2025 17:40
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* made lines of code instead

* Update scripts/fetch-contributors.js

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Fix 0 id

---------

Co-authored-by: Razvan Radulescu <43811028+h3xxit@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Sep 4, 2025

@cubic-dev-ai review

@h3xxit I've started the AI code review. It'll take a few minutes to complete.

1 similar comment
@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Sep 4, 2025

@cubic-dev-ai review

@h3xxit I've started the AI code review. It'll take a few minutes to complete.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

8 issues found across 12 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

}

.linesChangedLabel {
font-size: 0.4rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Font size is too small for readability on mobile; increase to at least ~0.75rem for legibility.

Prompt for AI agents
Address the following comment on src/pages/hall-of-fame.module.css at line 844:

<comment>Font size is too small for readability on mobile; increase to at least ~0.75rem for legibility.</comment>

<file context>
@@ -0,0 +1,846 @@
+  }
+  
+  .linesChangedLabel {
+    font-size: 0.4rem;
+  }
+}
</file context>


.contributorStatus {
font-size: 0.75rem;
color: #666666;
Copy link
Contributor

Choose a reason for hiding this comment

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

Text color is low-contrast against the dark background; use a lighter gray to improve readability.

Prompt for AI agents
Address the following comment on src/pages/hall-of-fame.module.css at line 343:

<comment>Text color is low-contrast against the dark background; use a lighter gray to improve readability.</comment>

<file context>
@@ -0,0 +1,846 @@
+
+.contributorStatus {
+  font-size: 0.75rem;
+  color: #666666;
+  margin: 0;
+  font-style: italic;
</file context>

- **Hybrid impact scoring** combining recent activity, overall contributions, code quality, and multi-project involvement
- Status determination based on impact scores and activity recency
- Real GitHub profile images with emoji fallbacks for errors
- Badge assignment for notable contributors based on multiple metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

Claims badges are assigned based on multiple metrics, but only a single impact-score-based badge is implemented.

Prompt for AI agents
Address the following comment on hall-of-fame-docs.md at line 20:

<comment>Claims badges are assigned based on multiple metrics, but only a single impact-score-based badge is implemented.</comment>

<file context>
@@ -0,0 +1,185 @@
+   - **Hybrid impact scoring** combining recent activity, overall contributions, code quality, and multi-project involvement
+   - Status determination based on impact scores and activity recency
+   - Real GitHub profile images with emoji fallbacks for errors
+   - Badge assignment for notable contributors based on multiple metrics
+
+3. **Automatic Updates**: GitHub Actions automatically updates the contributors data:
</file context>

id: number;
name: string;
username: string;
githubUsername: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate fields username and githubUsername store the same data; consolidate to a single property to avoid drift and simplify usage.

Prompt for AI agents
Address the following comment on src/types/contributors.ts at line 54:

<comment>Duplicate fields username and githubUsername store the same data; consolidate to a single property to avoid drift and simplify usage.</comment>

<file context>
@@ -0,0 +1,86 @@
+  id: number;
+  name: string;
+  username: string;
+  githubUsername: string;
+  role: string;
+  status: string;
</file context>

"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"build:fast": "docusaurus build",
Copy link
Contributor

Choose a reason for hiding this comment

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

Script name suggests a faster build but runs the same command as build, which can mislead contributors and CI.

Prompt for AI agents
Address the following comment on package.json at line 9:

<comment>Script name suggests a faster build but runs the same command as build, which can mislead contributors and CI.</comment>

<file context>
@@ -6,13 +6,15 @@
     &quot;docusaurus&quot;: &quot;docusaurus&quot;,
     &quot;start&quot;: &quot;docusaurus start&quot;,
     &quot;build&quot;: &quot;docusaurus build&quot;,
+    &quot;build:fast&quot;: &quot;docusaurus build&quot;,
     &quot;swizzle&quot;: &quot;docusaurus swizzle&quot;,
     &quot;deploy&quot;: &quot;docusaurus deploy&quot;,
</file context>

h3xxit and others added 3 commits September 4, 2025 13:52
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@h3xxit h3xxit merged commit f56cf36 into main Sep 4, 2025
1 check passed
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.

3 participants