Skip to content

Commit

Permalink
Merge pull request #1051 from doniyor2109/master
Browse files Browse the repository at this point in the history
Get blob url for pr commit.
  • Loading branch information
orta committed Jun 24, 2020
2 parents 067e7af + a77ce21 commit af9ca0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -19,6 +19,7 @@ x
- Fix Typo in README.md [@NotMoni]
- Fix danger failure on getting diff for files with spaces in file path [@HonzaMac]
- Document how to disable transpilation [@rzgry]
- Fix get blob url for pr commit [@doniyor2109]

<!-- Your comment above this -->

Expand Down Expand Up @@ -1772,7 +1773,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@ninjaprox]: https://github.com/ninjaprox
[@nminhnguyen]: https://github.com/NMinhNguyen
[@nornagon]: https://github.com/nornagon
[@NotMoni]: https://github.com/NotMoni
[@notmoni]: https://github.com/NotMoni
[@orta]: https://github.com/orta
[@osmestad]: https://github.com/osmestad
[@patrickkempff]: https://github.com/patrickkempff
Expand Down Expand Up @@ -1802,3 +1803,4 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@417-72ki]: https://github.com/417-72KI
[@soyn]: https://github.com/Soyn
[@tim3trick]: https://github.com/tim3trick
[@doniyor2109]: https://github.com/doniyor2109
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 af9ca0d

Please sign in to comment.