Updates Projects and Contributors Wall with Real Data.#56
Conversation
|
@Pranav00076 is attempting to deploy a commit to the Rishi Bhardwaj's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a Bash pipeline that collects GitHub organization repos, contributors, and members, writes a summary JSON, updates ChangesGitHub Data Integration & Dynamic UI
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@RishiByte Check the PR. |
|
@Pranav00076 there is a branch conflict on it rn solve it |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
index.html (1)
212-240:⚠️ Potential issue | 🟠 Major | ⚡ Quick winBind stats and project cards to
github_summary.jsoninstead of hardcoding.Line 230 currently shows
2contributors, butgithub_summary.jsonin this PR hascontributor_count: 16. The same drift risk exists for the hardcoded project list in Lines 339-401. Please render these from the fetched summary so the page stays correct after each data refresh.Also applies to: 339-401
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@index.html` around lines 212 - 240, The stats and project cards are hardcoded; update the UI to render from the fetched github_summary.json instead: replace the static numeric blocks that use the "text-headline-md font-headline-md" elements (and the adjacent "text-code-sm ...">Contributors / Students Engaged / Repository Stars / Active Projects labels) with values pulled from the parsed github_summary object (e.g., contributor_count, repository_stars, project_count, student_count or their actual keys in github_summary.json), and replace the hardcoded project list markup with a loop that renders project card elements from github_summary.projects (or the projects array in the JSON) when building the DOM; ensure the data fetch that produces githubSummary (or similarly named variable) is awaited/available before mounting these elements so the counts and cards always reflect the JSON.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@fetch_github_data.sh`:
- Around line 21-25: The curl calls that populate REPOS (and similar later
calls) can return HTTP error payloads which jq then treats as unexpected
objects; update the curl invocation used to build REPOS to fail fast and
validate the response before jq (e.g., use curl --fail -S or capture HTTP
status) and check that the body is a JSON array before computing PROJECT_COUNT,
TOTAL_STARS and REPOS_DATA; if the call fails or the body is not an array, log
the error and exit non‑zero so downstream jq aggregations (jq -s 'add', the
REPOS_DATA/jq expressions) never run on an error payload.
- Around line 21-23: The script currently only fetches the first page of org
repos and members into REPOS (and members) then computes PROJECT_COUNT and
TOTAL_STARS from that single page; update the logic to implement real pagination
by repeatedly requesting the GitHub API with per_page=100&page=N (or follow the
Link header) and concatenating results until no more pages, storing the full
aggregated JSON into REPOS and members variables, then recompute PROJECT_COUNT
and TOTAL_STARS from the aggregated REPOS and recompute contributor_count from
aggregated members; ensure the loop handles empty pages, preserves JSON array
structure when appending, and reuses the existing variable names (REPOS,
PROJECT_COUNT, TOTAL_STARS, members, contributor_count) so downstream code
remains unchanged.
In `@index.html`:
- Around line 497-516: The contributor loader fetch block lacks HTTP/schema
guards and a visible fallback; update the fetch promise chain (the fetch(...)
call handling) to check res.ok before calling res.json(), validate that
Array.isArray(data.members) before iterating, and if either check fails or an
error is caught, set a user-visible message inside the element with id
'contributors-list' (e.g., "Contributors unavailable") instead of leaving the
container empty; ensure you still log the error to console and avoid calling
forEach on an undefined members property.
---
Outside diff comments:
In `@index.html`:
- Around line 212-240: The stats and project cards are hardcoded; update the UI
to render from the fetched github_summary.json instead: replace the static
numeric blocks that use the "text-headline-md font-headline-md" elements (and
the adjacent "text-code-sm ...">Contributors / Students Engaged / Repository
Stars / Active Projects labels) with values pulled from the parsed
github_summary object (e.g., contributor_count, repository_stars, project_count,
student_count or their actual keys in github_summary.json), and replace the
hardcoded project list markup with a loop that renders project card elements
from github_summary.projects (or the projects array in the JSON) when building
the DOM; ensure the data fetch that produces githubSummary (or similarly named
variable) is awaited/available before mounting these elements so the counts and
cards always reflect the JSON.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3e01c110-ce2f-40e1-9364-03d41154489e
📒 Files selected for processing (4)
.gitignorefetch_github_data.shgithub_summary.jsonindex.html
|
@RishiByte check the New PR. |
Updates Projects and Contributors Wall with Real Data.
Summary by CodeRabbit
Updates
New Features
Chores
New Tools