Repository navigation
Check the committed API files in the same action and comment - #118
Merged
Merged
Conversation
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>
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.
One action, one comment:
nullean/assembly-differ@v1now also checks the committed.apifiles, and its comment lists every assembly it compared, with an all-good line when nothing changed. The separateverify-apiaction 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/*.apiran two actions,assembly-differandassembly-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.ymlgetsapi-files, the directory of committed.apifiles, andapi-split. Whenapi-filesis set, a step runsapi --verifywith the samepackage,projects,targetandframeworkas the comparison. It also sets the outputapi-files-match. Theverify-apiaction and the workflow that ran it are deleted.One comment
pull-requesttakes--api-codeand--api-report, the exit code and output ofapi --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 changesand the heading says✅ All good: the public API is unchanged.when nothing at all changed. Changed assemblies keep their collapsible details.Breaking: the
verify-apiaction no longer exists, and the comment text changes. Nothing used either, per the maintainer. It is labelledfeature, so the next release is 1.4.0; switch the label tobreakingfor 2.0.0. Thepull-requesthelp snapshot gains two options, and four comment snapshots are new.Out of scope: this repository's own
verify-apiworkflow is deleted, not ported, because the new action needs the tool version this change ships in. A follow-up can runuses: ./withapi-files: apionce it is released;./build.sh verifyapistill fails CI on drift. Projects mode does not report the release it compared with in the comment.Verify
Removing the all-good line fails three of the snapshot tests. I also ran the Compare, Verify and Report steps of
action.ymlas 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 andThe committed API files match the build (6 files). After adding a public type, it reportsMinor, the changed assembly's details, the files as out of date and exit code 5.zizmor --min-severity mediumon the repository reports nothing.🤖 Generated with Claude Code