-
Notifications
You must be signed in to change notification settings - Fork 1
feat: enhance stats component with organization data #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Upgrade gitevents-fetch from 0.0.3 to 1.4.0 - Add fetchOrganization function to fetch GitHub org data - Display community member count and public repo count in hero stats - Add past events count to stats section The Stats component now shows: - Schedule (existing) - Location (existing) - Community Members (new - from GitHub org) - Open Source Projects (new - from GitHub org) - Past Events (new - computed from past events) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Deploying website with
|
| Latest commit: |
e907258
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b8dca89c.website-agq.pages.dev |
| Branch Preview URL: | https://feat-enhance-stats-with-org.website-agq.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for displaying organization statistics by integrating the fetchOrganization function from the updated gitevents-fetch package. The changes upgrade the package from version ^0.0.3 to ^1.4.0 and utilize the new getOrganization API to fetch and display community member counts and past event statistics.
- Updated
gitevents-fetchpackage from^0.0.3to^1.4.0 - Added
fetchOrganizationfunction to fetch organization data from GitHub - Added display of community member count and past events count in the hero section stats
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/pages/index.astro | Imports and uses fetchOrganization to display organization member count and past events count in the hero stats section |
| src/lib/events.js | Adds fetchOrganization wrapper function that calls getOrganization from gitevents-fetch |
| package.json | Updates gitevents-fetch dependency from ^0.0.3 to ^1.4.0 |
| package-lock.json | Updates lockfile with new version, resolved URL, and integrity hash for gitevents-fetch@1.4.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export async function fetchOrganization(org) { | ||
| try { | ||
| const orgData = await getOrganization(org) | ||
| return orgData | ||
| } catch (error) { | ||
| console.error(`Error fetching organization ${org}:`, error) | ||
| return null | ||
| } | ||
| } |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The function simply passes through the result from getOrganization without any transformation. Lines 130-131 could be simplified to return await getOrganization(org) or the function could include transformation logic if needed for consistency with other fetch functions in this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
|
@PatrickHeneise I've opened a new pull request, #97, to work on those changes. Once the pull request is ready, I'll request review from you. |
Summary
getOrganization()functionfetchOrganization()wrapper in events.js to fetch GitHub organization dataChanges
The Stats component now displays:
Screenshot
Test plan
🤖 Generated with Claude Code