Skip to content

Fetch component status through GitHub API - #5

Merged
FlyOverCoderKY merged 1 commit into
mainfrom
codex/sessions-status
Jul 27, 2026
Merged

FlyOverCoderKY merged 1 commit into
mainfrom
codex/sessions-status

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

Summary

  • switch build-time PROJECT_PLAN.md status fetches from raw.githubusercontent.com to GitHub's contents API raw media response
  • request no-store so the static roadmap does not compile stale component status after a source plan just merged

Verification

  • npm run build
  • generated dist/stack.html and dist/roadmap.html include the Sessions Phase 2 review status from pegma-dev/sessions main

Copilot AI review requested due to automatic review settings July 27, 2026 22:40
@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@FlyOverCoderKY
FlyOverCoderKY merged commit c31d25e into main Jul 27, 2026
2 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the codex/sessions-status branch July 27, 2026 22:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the build-time “component status” compiler used by the roadmap/stack pages to fetch each repo’s PROJECT_PLAN.md via the GitHub Contents API (raw media) instead of raw.githubusercontent.com, aiming to reduce stale status during static builds.

Changes:

  • Switch plan fetch URL from raw.githubusercontent.com to api.github.com/repos/.../contents/... with Accept: application/vnd.github.raw.
  • Add request options/headers intended to prevent stale/cached responses during the build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/data/live-status.ts
Comment on lines +15 to +22
const res = await fetch(url, {
cache: 'no-store',
headers: {
Accept: 'application/vnd.github.raw',
'User-Agent': 'pegma-dev-status-build',
},
signal: AbortSignal.timeout(10_000),
});
Comment thread src/data/live-status.ts
Comment on lines +13 to +22
const url = new URL(`https://api.github.com/repos/pegma-dev/${repo}/contents/${plan}`);
url.searchParams.set('ref', 'main');
const res = await fetch(url, {
cache: 'no-store',
headers: {
Accept: 'application/vnd.github.raw',
'User-Agent': 'pegma-dev-status-build',
},
signal: AbortSignal.timeout(10_000),
});

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1241eec062

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/data/live-status.ts
Comment on lines +17 to +20
headers: {
Accept: 'application/vnd.github.raw',
'User-Agent': 'pegma-dev-status-build',
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Authenticate the contents API requests

Each CI build now sends nine unauthenticated GitHub REST requests, but unauthenticated traffic is limited to 60 requests per hour per source IP; hosted runners share source IPs, so an exhausted quota makes these requests return 403. Because fetchStage silently converts those responses to null, the production or preview build then publishes the hand-written now values rather than the source plans. Pass an authenticated token from the workflow or retain an endpoint that does not consume the REST API quota.

AGENTS.md reference: AGENTS.md:L28-L30

Useful? React with 👍 / 👎.

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