Skip to content

Comments

Generate org-wide sprint and lifetime JSON (#141)#143

Open
dhyana6466 wants to merge 1 commit intomainfrom
issue-141-orgwide-json
Open

Generate org-wide sprint and lifetime JSON (#141)#143
dhyana6466 wants to merge 1 commit intomainfrom
issue-141-orgwide-json

Conversation

@dhyana6466
Copy link
Collaborator

@dhyana6466 dhyana6466 commented Feb 25, 2026

Description

This PR updates the data collection script to generate org-wide sprint and lifetime JSON instead of using a hardcoded list of repositories.
Previously, the script only pulled data from two repos. I changed it so it dynamically fetches all non-archived repositories from the oss-slu organization and generates:

  • lifetime_data.json
  • sprint_data.json
    I also handled edge cases we ran into while testing:
  • Empty repositories (409 errors)
  • API instability when fetching PR data
  • Avoided crashes by adding safe error handling
    The generated JSON files are placed in Frontend/public/data/ so the homepage can immediately use them without waiting for the first workflow run.

Fixes #141

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

I tested this locally by:

  1. Running lifetime mode:
    python -m Backend.dataCollection.collectData --mode lifetime
  2. Running sprint mode:
    python -m Backend.dataCollection.collectData --mode sprint
  3. Confirming both JSON files were generated inside Frontend/public/data/.
  4. Running the frontend locally with npm run dev and verifying that:
    • The Home Page charts render correctly.
    • Data reflects org-wide metrics.
    • No console errors or 404s.
  • Test A
  • Test B

Test Configuration:

  • Python 3.11
  • Local dev server (Frontend)
  • GitHub token with read access

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshot of Output

image

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.

Generate Org-Wide JSON (Sprint & Lifetime)

1 participant