[BUG] Not Found error when running danger with GitLab CE without MR approvals API
See original GitHub issueDescribe the bug Our builds have started failing with the following error since using v10.6.2:
Error: { HTTPError: Not Found
at fn (/root/.npm/_npx/15/lib/node_modules/danger/node_modules/ky/umd.js:266:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
name: 'HTTPError',
response:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
[Symbol(Response internals)]:
{ url:
'https://$GITLAB/api/v4/projects/$PROJECT/merge_requests/579/approvals',
status: 404,
statusText: 'Not Found',
headers: [Headers],
counter: 0 } },
description: '404 Not Found' }
To Reproduce Steps to reproduce the behavior:
- Execute danger with selfhosted GitLab CE without MR approvals API (for example 12.8.6)
- Above error will occur
Expected behavior
Danger shouldn’t fail, either by allowing the user to configure skipping using this approvals API or ignoring the error and carrying on without these API results. Or maybe there is a more elegant solution that I am not thinking of at the moment.
Screenshots If applicable, add screenshots to help explain your problem.
Your Environment
software | version |
---|---|
danger.js | 10.6.2 |
node | 10.23.2 |
Operating System | swift:5.2 docker image (Ubuntu 18.04) |
Gitlab | GitLab Community Edition 12.8.6 |
Additional context Also according to https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals this API will be moved to GitLab Premium only in 13.9, so expecting the API to exist/work might become problematic then as well. Probably introduced in #1098.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Any update here ? Facing the same problem in
GitLab Community Edition 13.0.10
Is resolving yet? Currently in gitlab(11.9.9) and danger(10.7.1) this issue still exists. Danger try to fetch “api/v4/projects/person%2Fproject/merge_requests/1/approvals”