Skip to content

Fail the API check only for a breaking change the pull request itself makes - #234

Merged
Mpdreamz merged 2 commits into
mainfrom
chore/assembly-differ-1.5.0
Nov 25, 2026
Merged

Mpdreamz merged 2 commits into
mainfrom
chore/assembly-differ-1.5.0

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

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 main has 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 in dotnet-tools.json go 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 in validatepackages; 1.5.1 fetches into a repository of its own. With api-files: api, the action now compares a pull request's committed api/ with its base branch's, target framework by target framework, and the check, the release label and --fail-on follow 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

dotnet tool restore
./build.sh verifyapi

On this pull request the comment compares with main and lists both libraries as having no changes. I ran the steps of the new action on the real stack beforehand: #227 gets None and passes, and #220, which does break the API, gets the breaking label and fails.

🤖 Generated with Claude Code

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>
@Mpdreamz Mpdreamz added the Infra Build and repository infrastructure label Nov 25, 2026
@github-actions

Copy link
Copy Markdown

API changes in this pull request: suggested version change None

Compared with the base branch main. ✅ All good: this pull request does not change the public API.

  • ✅ Elastic.Transport.VirtualizedCluster: no changes
  • ✅ Elastic.Transport (net10.0, net462, net8.0, netstandard2.0, netstandard2.1): no changes
Since the last release: None, no breaking changes; for information, it does not fail this check

✅ All good: the public API is unchanged.

  • ✅ Elastic.Transport.dll: no changes
  • ✅ Elastic.Transport.VirtualizedCluster.dll: no changes

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>
@Mpdreamz
Mpdreamz merged commit 91b2a0b into main Nov 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infra Build and repository infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant