Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get blob url for pr commit. #1051

Merged
merged 3 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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