Repository navigation
Conversation
… pass release asked nuget.org alone for the version before, and failed when there was none, so a new package could not run it in CI. It now finds the newest stable release before the version on the feeds NuGet.config lists, says which one it compares with, and compares that exact version. With no earlier release it reports a first release and succeeds, unless --require-baseline is set; json and github-comment say so too. The NuGet providers read NuGet.config from the current directory. Fixes #24. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
added a commit
that referenced
this pull request
Nov 14, 2026
A new `pull-request` command reads `api-changes.json` and puts it on the pull request a GitHub Actions run is for. It writes the job summary, keeps one comment up to date, and sets the release label the suggested change calls for. **Prompt summary:** The tool is being dusted off. It needs a clear path to hooking it up to pull requests, and it should set labels. The label it sets is the one release-drafter turns into the next version, which closes the loop between an API change and its release. ## Why The GitHub Action ran the diff and stopped. Posting the `github-comment` file, finding the old comment and choosing a label was left to each repository's workflow, and nothing set a label from the suggested change. ## What #### One comment, kept up to date The comment opens with a hidden marker, `<!-- assembly-differ -->`. A later run finds it and edits it, so a pull request never collects one comment per push. It shows the suggested change, the baseline when there is one, the number of breaking changes, and each assembly's changes as a nested list in a collapsed block. Past 60,000 characters it stops and says how many changes did not fit. The same text goes to `GITHUB_STEP_SUMMARY`. #### Labels it owns, and only those `Major` sets `breaking`, `Minor` sets `feature`, and `Patch` sets none. `--major-label`, `--minor-label` and `--patch-label` change that. The comment records which labels this tool set. A later run removes only those, so a label a person added stays, and a change that drops from `Major` to `Minor` swaps `breaking` for `feature`. #### Forks and other runs A read-only token, as on a pull request from a fork, gets 403 or 404. The command then writes the job summary, prints a warning and exits `0`. Outside a pull request, with no number in `GITHUB_EVENT_PATH` and no `--pull-request`, it writes the summary only. If GitHub cannot be reached, it prints why and exits `1`. Requests and responses use `HttpClient` and `Utf8JsonWriter`, so the native-AOT binary runs it. ## Verify ```bash mise run test # PullRequestTests run the command against FakeGitHub, an in-memory GitHub API on localhost ``` **Stack:** 2 of 2, on top of [#76](#76). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
releasenow finds the version it compares with on the feeds NuGet.config lists, says which one it is, and succeeds on a package that has no earlier release.Prompt summary: The tool is being dusted off. It often failed on new packages, because of a chicken-and-egg problem, especially in CI. A release check has to work from a package's very first version, on private feeds as well as nuget.org.
Why
previous-nugetasked nuget.org alone, so a package on a private feed had no baseline (#24). A package without an earlier release failed the comparison with "Unable to create diff!" and exit code1, so a new package could not run the check in CI. The only way out was--allow-empty-previous-nuget, which printed a warning but no report.What
The baseline comes first
releaselooks up the newest stable version before the one being released on every enabled NuGet.config source. It prints[diff] Comparing with MyLib 1.1.0, the release before 1.2.0, then compares that exact version. Prereleases and later versions are skipped. Thenugetprovider and the hiddendiff'sprevious-nugetread NuGet.config from the current directory as well, the waydotnet restoredoes.A first release passes
With no earlier release,
releaseprints that this is a first release and exits0with a suggested change ofNone.--require-baselinemakes it fail instead.--format jsonwrites"firstRelease": true, and--format github-commentwrites a comment that says so. When a baseline was resolved, the json report names it in"baseline".Tests without nuget.org
ReleaseTestsgives each test a local folder feed, a NuGet.config that clears every other source, and its ownNUGET_PACKAGES, so they never touch nuget.org or the user's package cache. The tests cover the version picked among prereleases and later versions, a first release with and without--require-baseline, and a first release ingithub-comment. Allowing prereleases on purpose fails the first of them.Verify
mise run testOut of scope: A baseline from a committed API snapshot comes with the snapshot package.
🤖 Generated with Claude Code