Skip to content

Commit

Permalink
Get blob url for pr commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
doniyor2109 committed Jun 24, 2020
1 parent 067e7af commit 2ff41e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/platforms/github/comms/checks/resultsToCheck.ts
Expand Up @@ -70,7 +70,12 @@ export const resultsToCheck = async (
try {
// response of getContents() can be one of 4 things. We are interested in file responses only
// https://developer.github.com/v3/repos/contents/#get-contents
const { data } = await api.repos.getContents({ repo: pr.head.repo.name, owner: pr.head.repo.owner.login, path })
const { data } = await api.repos.getContents({
path,
ref: pr.head.sha,
repo: pr.head.repo.name,
owner: pr.head.repo.owner.login,
})
if (Array.isArray(data)) {
console.error(`Path "${path}" is a folder - ignoring`)
return ""
Expand Down

0 comments on commit 2ff41e7

Please sign in to comment.