Commit cf4729b
authored
feat: add automatic API breaking change detection (#46)
* feat: add automatic API breaking change detection with cargo-semver-checks
Implement automatic detection of breaking changes in public APIs using
cargo-semver-checks instead of relying on manual labels or keywords.
Changes:
- Add cargo-semver-checks installation to auto-label workflow
- Check CLI and SDK crates for API breaking changes
- Automatically apply semantic:major label when API changes detected
- Update PR comment to show API breaking change analysis
- Works with existing release-on-breaking-change workflow
Detection now works by analyzing actual API changes:
- Removed public functions
- Changed function signatures
- Removed/renamed struct fields
- Changed trait bounds
- And more...
This eliminates the need for manual "breaking change" annotations
and ensures releases are triggered based on actual code changes.
Example: PR #44 removed CLI arguments and command structures - this
would now be automatically detected and labeled as breaking.
* fix(workflow): use baseline-rev for semver checks on unpublished crates
This fixes the cargo-semver-checks integration to work with unpublished
crates by comparing against the PR base branch using --baseline-rev.
Changes:
- Add explicit fetch of base branch for comparison
- Update semver-checks to use --baseline-rev origin/${{ github.base_ref }}
- Remove CLI checking (binary-only, no public API to check)
- Focus only on SDK/core library which has a public API
- Update PR comments to clarify only SDK is checked
This resolves the errors:
- "core not found in registry (crates.io)" - now uses git baseline
- "no library targets selected" for CLI - now skipped with explanation1 parent c8ba8f7 commit cf4729b
1 file changed
+73
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
21 | 70 | | |
22 | 71 | | |
| 72 | + | |
| 73 | + | |
23 | 74 | | |
24 | 75 | | |
25 | 76 | | |
| |||
102 | 153 | | |
103 | 154 | | |
104 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
105 | 171 | | |
106 | 172 | | |
107 | 173 | | |
| |||
147 | 213 | | |
148 | 214 | | |
149 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
150 | 220 | | |
151 | 221 | | |
152 | 222 | | |
153 | | - | |
| 223 | + | |
154 | 224 | | |
155 | 225 | | |
156 | 226 | | |
157 | 227 | | |
158 | 228 | | |
159 | | - | |
| 229 | + | |
| 230 | + | |
160 | 231 | | |
161 | 232 | | |
162 | 233 | | |
| |||
0 commit comments