swift icon indicating copy to clipboard operation
swift copied to clipboard

http in DANGER_GITLAB_API_BASE_URL ignored

Open SvenMuc opened this issue 3 years ago • 1 comments

I have a local installation of GitLab and therefore do not use any encryption. Danger JS had no issues with this setup. danger swift ignores the http definition in DANGER_GITLAB_API_BASE_URL and changes the address to https.

How can I force the http connection?

Environment Variables

$ printenv
...
DANGER_GITLAB_API_BASE_URL=http://*****.local/api/v4
DANGER_GITLAB_API_TOKEN=*********
...

danger-swift ci

$ danger-swift ci
184Error:  FetchError: request to https://*****.local/api/v4/projects/******/merge_requests/21/changes failed, reason: connect ECONNREFUSED ******:443
185    at ClientRequest.<anonymous> (/snapshot/danger-js/node_modules/node-fetch/lib/index.js:1444:11)
186    at ClientRequest.emit (events.js:210:5)
187    at TLSSocket.socketErrorListener (_http_client.js:406:9)
188    at TLSSocket.emit (events.js:210:5)
189    at emitErrorNT (internal/streams/destroy.js:92:8)
190    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
191    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
192  message: 'request to https://****.local/api/v4/projects/******/merge_requests/21/changes failed, reason: connect ECONNREFUSED *****:443',
193  type: 'system',
194  errno: 'ECONNREFUSED',
195  code: 'ECONNREFUSED'

SvenMuc avatar Jun 07 '21 22:06 SvenMuc

Danger-Swift uses Danger-JS under the hood to make all the requests to the various platforms (GitLab, GitHub, Bitbucket etc), so I think Danger-JS will need to support http connections in order to make it work

f-meloni avatar Jun 19 '21 12:06 f-meloni