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

Github enterprise, 404 when trying to get PR reviews #170

Closed
alex3165 opened this issue Mar 15, 2017 · 3 comments
Closed

Github enterprise, 404 when trying to get PR reviews #170

alex3165 opened this issue Mar 15, 2017 · 3 comments

Comments

@alex3165
Copy link
Contributor

Is there a way to avoid trying to get the reviews from the API ? I am not using it and my enterprise Github API doesn't have this endpoint. Error message :

❯ npm run danger

> lerna-desktop@0.0.0 danger /Users/alexandrer/development/tango/trainline-desktop
> scripts/danger.sh

OK, looks good Fake Testing CI on GitHub
Request failed [404]: https://github.thetrainline.com/api/v3/repos/Tango/trainline-desktop/pulls/752/reviews
Response: {
  "message": "Not Found",
  "documentation_url": "https://developer.github.com/enterprise/2.8/v3"
}
Error:  Error: 404
    at GitHubAPI.<anonymous> (/Users/alexandrer/development/tango/trainline-desktop/node_modules/danger/distribution/api/fetch.js:92:27)
    at step (/Users/alexandrer/development/tango/trainline-desktop/node_modules/danger/distribution/api/fetch.js:32:23)
    at Object.next (/Users/alexandrer/development/tango/trainline-desktop/node_modules/danger/distribution/api/fetch.js:13:53)
    at fulfilled (/Users/alexandrer/development/tango/trainline-desktop/node_modules/danger/distribution/api/fetch.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:103:7)
@alex3165
Copy link
Contributor Author

alex3165 commented Mar 15, 2017

I think 123cb9d is the problem. Maybe adding a SHOULD_FETCH_REVIEWS env variable would work ? I am happy to work on this if it is ok for you

@alex3165 alex3165 changed the title Github entreprise, 404 when trying to get PR reviews Github enterprise, 404 when trying to get PR reviews Mar 15, 2017
@orta
Copy link
Member

orta commented Mar 15, 2017

This relates to #163 - right now if any API requests fail, then the build fails. However, if GH enterprise doesn't have the new reviews systems, then it'll need to fail and return an empty object/array without failing the build.

Think you can make the error handling move inline?

@alex3165
Copy link
Contributor Author

Hey @orta, I have opened a PR that should improve consistency as discussed in #163 as well.

See: #173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants