steps.metadata.outputs.directory is set to /main, not /, when package.json is at the root of the repository. I suspect adding target-branch to dependabot.yml (#330) added a main segment to Dependabot PR branch names, which changed the value of steps.metadata.outputs.directory.
By fixing this issue, we shouldn't need to routinely use stafftools to fix up template-oss Dependabot PRs. 🤞🏼
I couldn't quickly find a bump @npmcli/template-oss Dependabot PR for a workspace to inspect steps.metadata.outputs.directory and fix workspaces support. If that's important, we may want to either enable Dependabot for npm/cli or create a separate template-oss-test repo. It's not clear if Dependabot will create a PR for workspace/test-workspace upon our next release.
Example Dependabot PR branch names
The first PR updates just @npmcli/template-oss. The second updates multiple dependencies including @npmcli/template-oss.
steps.metadata.outputs.directory
is set to/main
, not/
, whenpackage.json
is at the root of the repository. I suspect addingtarget-branch
todependabot.yml
(#330) added amain
segment to Dependabot PR branch names, which changed the value ofsteps.metadata.outputs.directory
.By fixing this issue, we shouldn't need to routinely use stafftools to fix up template-oss Dependabot PRs. 🤞🏼
I couldn't quickly find a
bump @npmcli/template-oss
Dependabot PR for a workspace to inspectsteps.metadata.outputs.directory
and fix workspaces support. If that's important, we may want to either enable Dependabot fornpm/cli
or create a separatetemplate-oss-test
repo. It's not clear if Dependabot will create a PR forworkspace/test-workspace
upon our next release.Example Dependabot PR branch names
The first PR updates just
@npmcli/template-oss
. The second updates multiple dependencies including@npmcli/template-oss
.dependabot/npm_and_yarn/main/npmcli/template-oss-4.23.0
/main
dependabot/npm_and_yarn/main/dependency-updates-4de8b5bfcf
/
References
Failed "Post Dependabot" run: https://github.com/npm/agent/actions/runs/9963674341/job/27530225303
Fix manually tested here: https://github.com/npm/agent/pull/110/commits/ef85b0854e5ee9c26c289ceeba083edc3339a2bb
branchNameToDirectoryName
Bug report: https://github.com/dependabot/fetch-metadata/issues/540