Repository navigation
ci: strip VersionOverride from Dependabot pull requests - #57
Merged
Merged
Conversation
Dependabot adds a VersionOverride PackageReference when it bumps a package a project only receives transitively. Overrides are disabled under central package management, so restore fails with NU1013. The new workflow strips the override and pushes, leaving a plain reference that takes the central version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
odhiamboally
added a commit
to LlanSys/starter-template
that referenced
this pull request
Dec 1, 2026
Port of LlanSys/LlanSacco#57. Dependabot adds a VersionOverride PackageReference for transitive updates (e.g. Serilog in #39); central package management here disables overrides, so restore fails with NU1013. A pull_request_target workflow strips the override and pushes with DEPENDABOT_FIXUP_TOKEN so checks re-run. Co-authored-by: Claude Opus 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.
Why
Dependabot bumps a package that a project only receives transitively by adding a
PackageReferencewithVersionOverride(seen on #56 for Serilog inLS.Infrastructure). Overrides are disabled under central package management, so restore fails with NU1013 and every build check goes red. Transitive pinning stays off, ascheck-package-policy.ps1requires.What
Dependabot Override Cleanupworkflow (pull_request_target, Dependabot PRs from this repo only). It stripsVersionOverrideattributes/elements from project files and pushes, leaving a plainPackageReferencethat takes the central version. It never builds or runs PR code.docs/development/package-management-and-formatting.md.Setup required before merge
Add repository secret
DEPENDABOT_FIXUP_TOKEN(fine-grained PAT or GitHub App token,contents: writeon this repo).GITHUB_TOKENpushes don't re-trigger PR checks. Without the secret the job fails with a clear error.Notes
🤖 Generated with Claude Code