Repository navigation
Fail the API check only for a breaking change the pull request itself makes - #234
Merged
Merged
Conversation
The check, the release label and the comment follow what a pull request itself changes against its base branch, so a pull request is not held back by a breaking change main has, or by the pull requests below it in a stack. The comparison with the last release stays in the comment as information. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
API changes in this pull request: suggested version change NoneCompared with the base branch
Since the last release: None, no breaking changes; for information, it does not fail this check✅ All good: the public API is unchanged.
Public API files✅ The committed API files match the build (6 files). |
1.5.0 fetched the base branch into the workflow's checkout with --depth=1, which cut the history MinVer reads in a later step, so validatepackages saw version 0.1.0-canary. 1.5.1 fetches into a repository of its own. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
The API check now fails a pull request only for a breaking change the pull request itself makes, not for one that
main, or a pull request below it in a stack, already has.Prompt summary: The API comments on the stacked 2.0 pull requests listed breaking changes that the pull requests did not touch, and would turn every pull request red whenever
mainhas an unreleased breaking change. The owner asked for the check to follow only what a pull request itself changes, and for the pull requests that introduced the changes to be listed.Why
Since #232 the action compared each build with the latest release on nuget.org. A pull request in the middle of a stack therefore showed everything below it: #227 changes nothing in the public API and still listed 32 breaking changes and failed the check.
What
assembly-differ 1.5.0
The pinned action, the
version:input and the tool indotnet-tools.jsongo from 1.4.0 to 1.5.1 (nullean/assembly-differ#119, and the fix of 1.5.0 in #120). 1.5.0 fetched the base branch into the workflow's own checkout with--depth=1, which cut the history that MinVer reads invalidatepackages; 1.5.1 fetches into a repository of its own. Withapi-files: api, the action now compares a pull request's committedapi/with its base branch's, target framework by target framework, and the check, the release label and--fail-onfollow that. The comparison with the latest release stays in the comment, collapsed and marked as information, with a table of the pull requests below this one that introduced the changes. A change that is the same in every framework is listed once. No workflow change is needed: the new step reads the base branch and the open pull requests of a stack with the token the job already has.Out of scope: the 2.0 stack picks this up once it is rebased onto
main: a pull request runs the workflow of its base branch, so until then the stack pull requests run the old one.Verify
On this pull request the comment compares with
mainand lists both libraries as having no changes. I ran the steps of the new action on the real stack beforehand: #227 getsNoneand passes, and #220, which does break the API, gets thebreakinglabel and fails.🤖 Generated with Claude Code