Conversation
| // 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`); |
There was a problem hiding this comment.
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 >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}&since=${sixMonthsAgo.toISOString()}&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`); |
There was a problem hiding this comment.
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) => {
+ try {
+ const contributors = await githubApi(`/repos/${ORG_NAME}/${repoName}/contributors?per_page=100`);
+ return contributors.map(contributor => ({
+ ...contributor,
</file context>
| @@ -0,0 +1,65 @@ | |||
| name: Update Contributors Data | |||
There was a problem hiding this comment.
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 { |
There was a problem hiding this 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.
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; |
There was a problem hiding this 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.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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>
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>
@h3xxit I've started the AI code review. It'll take a few minutes to complete. |
1 similar comment
@h3xxit I've started the AI code review. It'll take a few minutes to complete. |
| } | ||
|
|
||
| .linesChangedLabel { | ||
| font-size: 0.4rem; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 @@
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
+ "build:fast": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
</file context>
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>
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
Migration