Skip to content

ci: auto-fix schema on /fix-schema comment#481

Open
margaretjgu wants to merge 5 commits into
mainfrom
ci/schema-auto-fix
Open

ci: auto-fix schema on /fix-schema comment#481
margaretjgu wants to merge 5 commits into
mainfrom
ci/schema-auto-fix

Conversation

@margaretjgu

Copy link
Copy Markdown
Member

When Check CLI schema is up to date fails on a PR, the job now posts a comment pointing to /fix-schema.

A new schema-auto-fix workflow listens for /fix-schema comments on PRs and automatically runs npm run build:schema, commits the result, and pushes it to the PR branch.

Closes nothing directly - companion to the existing schema check.

Comment thread .github/workflows/schema-auto-fix.yml Fixed
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 2 0 0 0.36s
✅ COPYPASTE jscpd yes no no 0.83s
✅ REPOSITORY gitleaks yes no no 59.92s
✅ REPOSITORY git_diff yes no no 0.4s
✅ REPOSITORY secretlint yes no no 30.88s
✅ REPOSITORY trivy yes no no 19.05s
✅ YAML yamllint 2 0 0 0.53s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Comment thread .github/workflows/schema-auto-fix.yml Outdated
jobs:
fix:
name: Regenerate and commit schema
if: github.event.issue.pull_request != null && contains(github.event.comment.body, '/fix-schema')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

will this contains rule get triggered when the ci.yml workflow posts Comment /fix-schema on this? Just making sure we avoid an infinite loop.

Comment thread .github/workflows/schema-auto-fix.yml Fixed
@margaretjgu
margaretjgu marked this pull request as draft July 17, 2026 15:06
Comment thread .github/workflows/schema-auto-fix.yml Fixed
Comment thread .github/workflows/schema-auto-fix.yml Fixed
Comment thread .github/workflows/schema-auto-fix.yml Fixed
@margaretjgu
margaretjgu marked this pull request as ready for review July 23, 2026 03:50
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.

3 participants