Skip to content

ci: auto-sync prompt artifacts from upstream prompts.yml#137

Merged
justin808 merged 3 commits into
mainfrom
jg/ci-sync-prompt-artifacts
Jul 5, 2026
Merged

ci: auto-sync prompt artifacts from upstream prompts.yml#137
justin808 merged 3 commits into
mainfrom
jg/ci-sync-prompt-artifacts

Conversation

@justin808

Copy link
Copy Markdown
Member

What

A scheduled GitHub Actions bot that regenerates the committed prompt artifacts from react_on_rails prompts.yml and opens a PR when they drift — mirroring react_on_rails' own update-llms-full.yml.

Why

The site build runs prepare:prompts, which regenerates prompts.ts / prompts.json / prompts/llms.txt from upstream prompts.yml and fails on drift (scripts/prepare-prompts.mjs). Those files are committed, so whenever upstream prompts.yml changes (e.g. shakacode/react_on_rails#4232) they go stale and every PR turns red until someone regenerates by hand — exactly what just happened on #136. This keeps them fresh automatically.

How

  • Triggers: daily schedule, workflow_dispatch, and the docs-updated repository_dispatch react_on_rails already sends to this repo.
  • npm run prepare ephemeral-clones react_on_rails main (via REACT_ON_RAILS_REPO_URL/REF, same as the build job) and regenerates.
  • Opens a PR scoped to just the 3 prompt artifacts (add-paths); the change-detection is also scoped to those 3 files.

Notes for the maintainer

  • Requires Settings → Actions → "Allow GitHub Actions to create and approve pull requests" (same as react_on_rails uses for its llms-full bot).
  • PRs opened by GITHUB_TOKEN don't auto-trigger the build check; review the small generated diff and merge (or enable auto-merge). I can add a check-dispatch step if you'd prefer it fully hands-off.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@justin808, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc951df4-064a-4b4c-a601-c3acdff935c0

📥 Commits

Reviewing files that changed from the base of the PR and between e39bb81 and 6115adf.

📒 Files selected for processing (1)
  • .github/workflows/sync-upstream-prompts.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/ci-sync-prompt-artifacts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jun 28, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds an automated prompt artifact sync workflow. The main changes are:

  • A daily, manual, and docs-updated dispatch trigger.
  • A Node 24 prepare run against react_on_rails main.
  • Scoped change detection and bot PR creation for the three prompt artifacts.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
.github/workflows/sync-upstream-prompts.yml Adds the GitHub Actions workflow that regenerates prompt artifacts and opens a scoped bot PR when they drift.

Reviews (1): Last reviewed commit: "ci: add bot to sync prompt artifacts fro..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

Cloudflare preview deployed.

@justin808

Copy link
Copy Markdown
Member Author

Codex closeout evidence for current head 6115adf3cc2bb29c35a96165d18c9fb261312e55:

  • Local validation: actionlint .github/workflows/sync-upstream-prompts.yml; npm run sync:docs; npm run prepare:docs; .agents/bin/validate passed. Docusaurus emitted the existing broken-link/broken-anchor warnings, but exited 0.
  • Hosted checks: CodeRabbit, build, and deploy all pass.
  • Review threads: none.
  • Preview smoke: https://9ed3bd64.reactonrails-com.pages.dev/ returned OK and rendered the React on Rails site.
  • Merge state: CLEAN.

Final state with merge_authority=ask: ready-no-merge-authority.

@justin808 justin808 merged commit bc88b20 into main Jul 5, 2026
3 checks passed
@justin808 justin808 deleted the jg/ci-sync-prompt-artifacts branch July 5, 2026 00:58
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.

1 participant