Skip to content

Conversation

@PatrickHeneise
Copy link
Member

Summary

  • Upgraded gitevents-fetch from 0.0.3 to 1.4.0 to access the new getOrganization() function
  • Added fetchOrganization() wrapper in events.js to fetch GitHub organization data
  • Enhanced the Stats component in the hero section with dynamic data from the boulder-js GitHub organization

Changes

The Stats component now displays:

  • Schedule: Every 4th Thursday (existing)
  • Location: Boulder, CO (existing)
  • Community Members: 18 (new - fetched from GitHub org member count)
  • Past Events: 10+ (new - computed from past events array)

Screenshot

Stats Enhanced

Test plan

  • Build succeeds without errors
  • Dev server runs and displays organization stats correctly
  • Stats show actual data from GitHub API (memberCount from org)
  • Stats gracefully handle missing data with optional chaining

🤖 Generated with Claude Code

- 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>
Copilot AI review requested due to automatic review settings October 29, 2025 23:45
@cloudflare-workers-and-pages
Copy link

Deploying website with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link

Copilot AI left a 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-fetch package from ^0.0.3 to ^1.4.0
  • Added fetchOrganization function 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.

Comment on lines +128 to +136
export async function fetchOrganization(org) {
try {
const orgData = await getOrganization(org)
return orgData
} catch (error) {
console.error(`Error fetching organization ${org}:`, error)
return null
}
}
Copy link

Copilot AI Oct 29, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

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

Copy link

Copilot AI commented Oct 30, 2025

@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.

@PatrickHeneise PatrickHeneise merged commit e907258 into main Oct 30, 2025
9 of 11 checks 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.

2 participants