Skip to content

feat(api): add GitHub health check to health endpoint#7824

Open
adepat06 wants to merge 1 commit into
JhaSourav07:mainfrom
adepat06:feat/health-endpoint
Open

feat(api): add GitHub health check to health endpoint#7824
adepat06 wants to merge 1 commit into
JhaSourav07:mainfrom
adepat06:feat/health-endpoint

Conversation

@adepat06

@adepat06 adepat06 commented Jul 8, 2026

Copy link
Copy Markdown

Description

Fixes #7806

Adds a lightweight GitHub health check to the existing /api/health endpoint.

Changes

  • Added a minimal GitHub GraphQL health check using viewer { login }.
  • Returns 503 with githubApi: "error" when the GitHub API is unreachable or the configured token is invalid/expired.
  • Returns 200 with githubApi: "ok" when the GitHub health check succeeds.
  • Keeps the endpoint independent of the contribution data cache and user-specific requests.
  • Added route tests covering both healthy and failure scenarios.

Pillar

  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A (API-only change)

Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter.
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🚨 Hey @adepat06, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:blocked This PR is blocked due to a failing CI check.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): add /api/health endpoint for service and GitHub token status

1 participant