Skip to content

ci(dependabot): block auto-merge when a package.json changes without its lockfile - #135

Merged
Jukingen merged 2 commits into
mainfrom
ci/dependabot-lockfile-guard
Oct 25, 2026
Merged

Jukingen merged 2 commits into
mainfrom
ci/dependabot-lockfile-guard

Conversation

@Jukingen

Copy link
Copy Markdown
Owner

Summary

Dependabot pull requests #119 and #120 updated frontend-sites/package.json and frontend-sites/package-lock.json without the root package-lock.json. Root npm ci then failed because the workspace manifest and the hoisted lock were out of sync.

The auto-merge job now reads gh pr diff --name-only after Dependabot metadata and before gh pr merge --auto. A patch or minor pull request that changes any package.json is auto-merged only when the root package-lock.json is in that diff. A workspace-local lockfile does not satisfy the check. When the root lock is missing, the job comments on the pull request and leaves auto-merge off. Pull requests with no package.json change (NuGet csproj bumps) are unchanged.

frontend-sites minor and patch updates for next, react, react-dom, and @types/* now share one Dependabot group so those manifests move together. That group still does not update the root lock; the guard keeps auto-merge off until it does.

Test plan

…its lockfile

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jukingen
Jukingen merged commit d287987 into main Oct 25, 2026
10 checks passed
@Jukingen
Jukingen deleted the ci/dependabot-lockfile-guard branch October 25, 2026 17:07
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