-
Notifications
You must be signed in to change notification settings - Fork 123
ci: add Swagger freshness check on proto changes #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Swagger Check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "proto/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "client/docs/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "x/**/query.go" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "x/**/tx.go" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - ".github/workflows/swagger-check.yml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "proto/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "client/docs/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+14
to
+16
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
On Line 14-16, pushes to Suggested patch push:
branches:
- main
paths:
- "proto/**"
- "client/docs/**"
+ - "x/**/query.go"
+ - "x/**/tx.go"
+ - ".github/workflows/swagger-check.yml"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Comment on lines
+6
to
+16
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - "proto/**" | |
| - "client/docs/**" | |
| - "x/**/query.go" | |
| - "x/**/tx.go" | |
| - ".github/workflows/swagger-check.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "proto/**" | |
| - "client/docs/**" | |
| - "proto/**" | |
| - "proto/scripts/**" | |
| - "client/docs/**" | |
| - "x/**/query.go" | |
| - "x/**/tx.go" | |
| - "go.mod" | |
| - "go.sum" | |
| - "Makefile" | |
| - ".github/workflows/swagger-check.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "proto/**" | |
| - "proto/scripts/**" | |
| - "client/docs/**" | |
| - "go.mod" | |
| - "go.sum" | |
| - "Makefile" |
Copilot
AI
Apr 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description says pushes to main should also trigger on x//query.go and x//tx.go changes, but the push.paths list only includes proto/** and client/docs/**. Please align the workflow triggers with the documented behavior (either expand push.paths accordingly or update the PR description).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow runs on changes to x//query.go and x//tx.go, but make proto-swagger-gen only scans *.proto files (and dependency protos via go.mod) during generation. This will trigger an expensive docker/go-mod step on handler-only changes that can’t affect Swagger output; consider removing these path patterns to reduce CI time, or document why they’re required.