Skip to content

ci: strip VersionOverride from Dependabot pull requests - #57

Merged
odhiamboally merged 1 commit into
mainfrom
claude/dependabot-override-cleanup
Dec 1, 2026
Merged

odhiamboally merged 1 commit into
mainfrom
claude/dependabot-override-cleanup

Conversation

@odhiamboally

Copy link
Copy Markdown
Contributor

Why

Dependabot bumps a package that a project only receives transitively by adding a PackageReference with VersionOverride (seen on #56 for Serilog in LS.Infrastructure). Overrides are disabled under central package management, so restore fails with NU1013 and every build check goes red. Transitive pinning stays off, as check-package-policy.ps1 requires.

What

  • New Dependabot Override Cleanup workflow (pull_request_target, Dependabot PRs from this repo only). It strips VersionOverride attributes/elements from project files and pushes, leaving a plain PackageReference that takes the central version. It never builds or runs PR code.
  • Documents the workflow and its secret in 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: write on this repo). GITHUB_TOKEN pushes don't re-trigger PR checks. Without the secret the job fails with a clear error.

Notes

  • After the workflow pushes, Dependabot stops rebasing that PR; use Update branch.
  • Not yet exercised on a live Dependabot PR.

🤖 Generated with Claude Code

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
odhiamboally merged commit 3ae036d into main Dec 1, 2026
11 checks passed
@odhiamboally
odhiamboally deleted the claude/dependabot-override-cleanup branch December 1, 2026 02:03
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant