Update src/dependabot/update_metadata.ts

Co-authored-by: Nish Sinha <nishnha@github.com>
This commit is contained in:
Michael Waddell
2022-02-09 13:42:39 -06:00
committed by GitHub
parent 8001861ce3
commit 4d237c6cf0

View File

@@ -15,7 +15,8 @@ export function parse (commitMessage: string, branchName: string, mainBranch: st
if (yamlFragment?.groups && branchName.startsWith('dependabot')) {
const data = YAML.parse(yamlFragment.groups.dependencies)
const delim = branchName[10]
# Since we are on the `dependabot` branch (9 letters), the 10th letter in the branch name is the delimiter
const delim = branchName[10]
const chunks = branchName.split(delim)
const dirname = chunks.slice(2, -1).join(delim) || '/'