The PR pipeline checks every PR to determine if it (potentially) introduces breaking changes or violates Azure Versioning policy.
The main tool for this is "openapi-diff" which checks two versions of an OpenAPI doc (old and new) and identifies all the "substantive changes" (changes in descriptions and such are ignored).
Our versioning policy requires that any "substantive change" be done in a new API version.
A subset of the "substantive changes" are also considered a "breaking change"
We add labels to the PR as follows:
- IF any change is classified as breaking AND the "old" OpenAPI doc is GA (same or different than new API version)
- Add the BreakingChangeReviewRequired label (Note that this may include cases that need a new API version)
- ELSE IF there are any substantive changes AND the "old" and "new" OpenAPI docs have the same version
- Add the VersioningReviewRequired label
- ELSE no label
- breaking change and old version was preview