Skip to content

fix: detect package manager and lockfile in automerge workflow - #193

Merged
k80bowman merged 1 commit into
mainfrom
k80/fix-automerge
Oct 8, 2026
Merged

k80bowman merged 1 commit into
mainfrom
k80/fix-automerge

Conversation

@k80bowman

Copy link
Copy Markdown
Contributor

Removes the npm and package-lock.json defaults so yarn and pnpm callers no longer need to specify inputs.

Adds a detect step which uses the inputs when set, otherwise finds the lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml) and infers the package manager from its name.

Remove the npm and package-lock.json defaults so yarn and pnpm callers no longer need to specify inputs. A detect step uses the inputs when set, otherwise finds the lockfile (package-lock.json, yarn.lock, pnpm-lock.yaml) and infers the package manager from its name.
@iowillhoit

Copy link
Copy Markdown
Contributor

I think this looks good.

  • All four input combinations (both set / either set / neither) resolve correctly.
  • The step runs after checkout so the [ -f ] sees checked out files.
  • npm is still the default (loop checks for package-lock.json first)
  • This fixes non-npm callers that previously got the hardcoded package-lock.json

@k80bowman
k80bowman marked this pull request as ready for review October 8, 2026 15:13
@k80bowman
k80bowman requested a review from a team as a code owner October 8, 2026 15:13
@k80bowman
k80bowman merged commit 3f7e381 into main Oct 8, 2026
4 checks passed
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.

2 participants