Open hashtagchris opened 1 month ago
Issue is still present in v2 release, and the main branch:
https://github.com/npm/agent/actions/runs/9976724284/job/27569631669
Run dependabot/fetch-metadata@main
Parsing Dependabot metadata
Outputting metadata for 1 updated dependency
outputs.dependency-names: @npmcli/template-oss
outputs.dependency-type: direct:development
outputs.update-type: version-update:semver-minor
outputs.directory: /main
outputs.package-ecosystem: npm_and_yarn
outputs.target-branch: main
outputs.previous-version: 4.22.0
outputs.new-version: 4.23.0
outputs.compatibility-score: 0
outputs.maintainer-changes: false
outputs.dependency-group:
outputs.alert-state:
outputs.ghsa-id:
outputs.cvss: 0
I'm sorry, I don't understand the issue as currently described.
What is your desired/expected behavior? And what is the current behavior?
The PR head branch name is incorrectly parsed by branchNameToDirectoryName under some conditions.
The directory
output is set to /
when the package.json is at the root of the repo.
The directory
output is set to /main
. main
being the target branch name. It is not a valid directory path for the repo.
I think the output directory is set to
/{branch-name}
whentarget-branch
is specified independabot.yml
, a single npm dependency is updated, and that dependency is scoped (has two segments).dependabot.yml
with target branch name: https://github.com/npm/agent/blob/21c19874834fb00c7ab37268b385fb84deb2df04/.github/dependabot.ymlExample Dependabot PR branch names
The first PR updates just
@npmcli/template-oss
. The second updates multiple dependencies including@npmcli/template-oss
.outputs.directory
dependabot/npm_and_yarn/main/npmcli/template-oss-4.23.0
/main
dependabot/npm_and_yarn/main/dependency-updates-4de8b5bfcf
/
npm/agent
output:npm/statusboard
output: