ci: autofix annotations and lint on pull requests - #122
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config/routes.rb(confirm_magic_linkand the/profile/emailsroutes). This fixesannotate_checkonmain.annotate_checknow uses a real database. Before, CI had no Postgres, so annotaterb skipped every model and reported "unchanged". Model drift was never caught. The job now startspostgres:17and loads the schema.development. The committed annotations include dev-only routes (letter_opener,actual_db_schema). Atestrun would delete them.Autofixworkflow on pull requests from this repo:annotaterb modelsandannotaterb routes.bin/rubocop -a(safe corrections only).chore: autofix annotations and lintto the PR branch asgithub-actions[bot].CIfor the new commit withworkflow_dispatch.flowchart LR P[PR opened or pushed] --> A[Autofix job] A --> D{Files changed?} D -- no --> E[Done] D -- yes --> C[Bot commits fix to PR branch] C --> W[workflow_dispatch CI on new commit]Limits
GITHUB_TOKENcannot push to a fork.lint.pull_requestruns for the bot commit as "action required". The dispatched CI run covers that commit.Test plan
b41d857), andconfig/routes.rbmatched the correct version again.lint,zeitwerk_check,scan_ruby,annotate_checkall pass.annotaterb models --frozenagainst a fresh test database: no changes.