github-tools / github-release-notes

Node module to create a release or a changelog from a tag and uses issues or commits to creating the release notes.
https://github-tools.github.io/github-release-notes/
GNU General Public License v3.0
880 stars 325 forks source link

Cannot read property of 'status' undefined for enterprise github #293

Closed bjhartin closed 3 years ago

bjhartin commented 3 years ago

Description

When running changelog or release against enterprise GitHub, it fails with "TypeError: Cannot read property 'status' of undefined" before any tasks run, i.e. before getting tags, etc.

I think this is similar to #120, but seems slightly different.

For example

$ docker run --rm -v /c/projects/myproject:/repo smartlyio/gren:0.17.0 changelog --api-url=https://api.github.mycompany.com --token=mytoken --username=myteam --repo=myproject

�  - Generate changelog file:
===================================
� - Getting the list of releases
TypeError: Cannot read property 'status' of undefined
    at handler (/usr/local/lib/node_modules/github-release-notes/node_modules/github-api/dist/components/Requestable.js:366:40)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

I have verified that I can get r eleases via the api url:

curl -k -X GET https://api.github.mycompany.com/repos/myteam/myproject/releases -H 'accept: application/json' -H 'authorization: token mytoken' -H 'content-type: application/json'

{ ... tags ...}

I added some logging to Requestable.js and can see its getting ECONNREFUSED but it works via curl with the same path/headers.

Environment

bjhartin commented 3 years ago

Closing this as the underlying problem was a certificate issue and not related to this project.