Skip to content

Commit

Permalink
Merge pull request pomber#107 from Arminkhodaei/dev
Browse files Browse the repository at this point in the history
bug fix in the case of encountering a deleted file commit
  • Loading branch information
pomber authored Feb 22, 2019
2 parents 54d9675 + 2d13566 commit f2d6bc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/git-providers/github-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ async function getContent(repo, sha, path) {
{ headers: getHeaders() }
);

if (contentResponse.status === 404) {
return { content: "" };
}
if (!contentResponse.ok) {
throw contentResponse;
}
Expand Down
3 changes: 3 additions & 0 deletions src/git-providers/gitlab-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function getContent(repo, sha, path) {
{ headers: getHeaders() }
);

if (contentResponse.status === 404) {
return { content: "" };
}
if (!contentResponse.ok) {
throw contentResponse;
}
Expand Down

0 comments on commit f2d6bc4

Please sign in to comment.