diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index 6d16a69c7c4bf8135cf600e2890efcfb627a99b7..a2479f849a97843b7963db86745d0f5e636ef43e 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -1088,7 +1088,7 @@ async function getFile(filePath, branchName) { let treeUrl = `repos/${config.repository}/git/trees/${config.baseBranch}`; const parentPath = path.dirname(filePath); if (parentPath !== '.') { - treeUrl += `.${parentPath}`; + treeUrl += `/${parentPath}`; } const baseName = path.basename(filePath); let fileSha; diff --git a/test/platform/github/__snapshots__/index.spec.js.snap b/test/platform/github/__snapshots__/index.spec.js.snap index 8ad665af2e776b4981389666220fcd439e132c9b..9d99beafe3d6783773b237a1ab12b68a24380550 100644 --- a/test/platform/github/__snapshots__/index.spec.js.snap +++ b/test/platform/github/__snapshots__/index.spec.js.snap @@ -353,7 +353,7 @@ Array [ "repos/some/repo/contents/backend/package-lock.json?ref=master", ], Array [ - "repos/some/repo/git/trees/master.backend", + "repos/some/repo/git/trees/master/backend", ], Array [ "repos/some/repo/git/blobs/some-sha",