Skip to content

chore(ci): Separate schema generation into dedicated workflow#799

Merged
yamadashy merged 2 commits intomainfrom
feat/schema
Aug 23, 2025
Merged

chore(ci): Separate schema generation into dedicated workflow#799
yamadashy merged 2 commits intomainfrom
feat/schema

Conversation

@yamadashy
Copy link
Owner

This PR separates the schema generation workflow from the main CI pipeline to improve efficiency and reduce unnecessary executions during PRs.

Summary

The generate-schema job has been moved from ci.yml to a new dedicated schema-update.yml workflow. This change prevents schema generation from running on every PR, as it's only needed when changes are merged to the main branch.

Key Changes

  • Removed generate-schema job from ci.yml
  • Created new schema-update.yml workflow with:
    • Triggers only on main branch pushes and manual dispatch
    • Path-based triggers for schema-related files
    • Proper contents: write permissions for git operations
    • Explicit GITHUB_TOKEN configuration

Benefits

  • Faster PRs: Eliminates unnecessary schema generation during PR validation
  • Reduced CI load: Schema updates only run when actually needed
  • Better separation of concerns: Testing and maintenance workflows are now distinct
  • Improved reliability: Proper permissions configuration prevents git operation failures

Path Triggers

The new workflow only runs when these files change:

  • src/config/configSchema.ts
  • package.json
  • website/client/package.json

Checklist

  • Run npm run test
  • Run npm run lint

Moved generate-schema job from ci.yml to a new schema-update.yml workflow to prevent unnecessary execution during PRs. The new workflow runs only on main branch pushes and includes proper permissions for git operations. This improves CI efficiency by separating concerns between testing and schema maintenance.
Copilot AI review requested due to automatic review settings August 23, 2025 06:59
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 23, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Caution

Review failed

The pull request is closed.

Walkthrough

Removes the generate-schema job from .github/workflows/ci.yml and introduces a dedicated .github/workflows/schema-update.yml workflow to generate and auto-commit the schema. Adds a new versioned schema at website/client/src/public/schemas/1.4.0/schema.json and updates the latest schema to include git includeLogs and includeLogsCount fields.

Changes

Cohort / File(s) Summary
CI workflow split
.github/workflows/ci.yml, .github/workflows/schema-update.yml
Removed generate-schema job from CI and added a standalone “Update Schema” workflow triggered on push/PR/dispatch, which checks out code, sets up Node, runs npm ci and website-generate-schema, and auto-commits changes.
New versioned schema 1.4.0
website/client/src/public/schemas/1.4.0/schema.json
Added a strict JSON Schema for Repomix configuration v1.4.0, defining input, output (including git settings), include/ignore/security/tokenCount, with additionalProperties disabled throughout.
Latest schema enhancements
website/client/src/public/schemas/latest/schema.json
Extended git section with optional includeLogs (boolean) and includeLogsCount (number).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer/PR
  participant GH as GitHub
  participant WF as Update Schema Workflow
  participant Node as Node/NPM
  participant Repo as Repo

  Dev->>GH: Push / PR to main (or manual dispatch)
  GH->>WF: Trigger "Update Schema"
  WF->>Repo: actions/checkout@<pinned>
  WF->>Node: setup-node (.tool-versions, npm cache)
  WF->>Node: npm ci
  WF->>Node: npm run website-generate-schema
  WF->>Repo: git-auto-commit (commit schema changes)
  Repo-->>Dev: Commit with "chore(schema): auto generate schema"
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ci: update schema on main #778 — Also modifies automated schema-generation in CI and updates schema files, overlapping with moving the job into a dedicated workflow.

Suggested reviewers

  • yamadashy

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3d29f17 and 5ef2e45.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml (0 hunks)
  • .github/workflows/schema-update.yml (1 hunks)
  • website/client/src/public/schemas/1.4.0/schema.json (1 hunks)
  • website/client/src/public/schemas/latest/schema.json (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/schema

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@claude
Copy link
Contributor

claude bot commented Aug 23, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 23, 2025

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ef2e45
Status: ✅  Deploy successful!
Preview URL: https://b2efa9de.repomix.pages.dev
Branch Preview URL: https://feat-schema.repomix.pages.dev

View logs

Copy link
Contributor

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 separates schema generation from the main CI pipeline by moving it to a dedicated workflow, improving CI efficiency by only running schema updates when needed.

  • Moved generate-schema job from ci.yml to new schema-update.yml workflow
  • Added proper permissions and triggers for the new schema workflow
  • Eliminated unnecessary schema generation during PR validation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/schema-update.yml New dedicated workflow for schema generation with proper permissions and triggers
.github/workflows/ci.yml Removed generate-schema job to streamline CI pipeline

@yamadashy yamadashy merged commit 7d1a6f6 into main Aug 23, 2025
2 of 3 checks passed
@yamadashy yamadashy deleted the feat/schema branch August 23, 2025 07:05
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