Skip to content

Check the committed API files in the same action and comment - #118

Merged
Mpdreamz merged 1 commit into
mainfrom
feature/combined-action
Nov 25, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
feature/combined-action

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

One action, one comment: nullean/assembly-differ@v1 now also checks the committed .api files, and its comment lists every assembly it compared, with an all-good line when nothing changed. The separate verify-api action is gone.

Prompt summary: While onboarding Elastic.Transport, the pull request showed two bot comments, one per action, and the report only listed the assembly that changed. The owner asked for one action and one comment, for unchanged assemblies to be listed as all good so it is clear the tool picked up what was expected, and said nobody uses the actions yet, so breaking changes are fine.

Why

A repository that commits api/*.api ran two actions, assembly-differ and assembly-differ/verify-api: two jobs, two builds, two tool installs and two comments that tell one story, what the pull request does to the API. The first comment also left out every assembly without changes. A run that found nothing looked the same as a run that compared nothing, so a reader could not tell whether the tool had picked up the libraries they expected.

What

One action

action.yml gets api-files, the directory of committed .api files, and api-split. When api-files is set, a step runs api --verify with the same package, projects, target and framework as the comparison. It also sets the output api-files-match. The verify-api action and the workflow that ran it are deleted.

One comment

pull-request takes --api-code and --api-report, the exit code and output of api --verify, and adds a "Public API files" section to the comment and the job summary: a tick and the file count when they match, or what changed, the version bump it calls for and the command that updates them. A mismatch exits with 5, after the comment is posted, and a check that could not run exits with its own code. A run with no release to compare with still reports the files.

Unchanged assemblies are listed

Every assembly in the report appears. Those without changes get ✅ **Name.dll**: no changes and the heading says ✅ All good: the public API is unchanged. when nothing at all changed. Changed assemblies keep their collapsible details.

Breaking: the verify-api action no longer exists, and the comment text changes. Nothing used either, per the maintainer. It is labelled feature, so the next release is 1.4.0; switch the label to breaking for 2.0.0. The pull-request help snapshot gains two options, and four comment snapshots are new.

Out of scope: this repository's own verify-api workflow is deleted, not ported, because the new action needs the tool version this change ships in. A follow-up can run uses: ./ with api-files: api once it is released; ./build.sh verifyapi still fails CI on drift. Projects mode does not report the release it compared with in the comment.

Verify

dotnet test --project tests/assembly-differ.Tests -c Release --treenode-filter "/*/*/PullRequestTests/*"

Removing the all-good line fails three of the snapshot tests. I also ran the Compare, Verify and Report steps of action.yml as a runner would, with a build of this tool, in a checkout of elastic/elastic-transport-net. In sync, the comment lists both libraries with a tick and The committed API files match the build (6 files). After adding a public type, it reports Minor, the changed assembly's details, the files as out of date and exit code 5. zizmor --min-severity medium on the repository reports nothing.

🤖 Generated with Claude Code

The action takes api-files: the directory of committed .api files is
verified against the build too, and the result is a section of the one
pull request comment, with the command that updates them. The comment
also lists every assembly it compared, the ones without changes too, and
says all is good when nothing changed. The verify-api action and its
workflow are gone; nothing used them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Mpdreamz Mpdreamz added the feature A new capability (minor bump) label Nov 25, 2026
@Mpdreamz
Mpdreamz merged commit 89b7a68 into main Nov 25, 2026
7 checks passed
@Mpdreamz
Mpdreamz deleted the feature/combined-action branch November 25, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new capability (minor bump)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant