mona-actions / gh-repo-stats

GH CLI extension to pull statistics on repository metadata used in GitHub migrations
MIT License
146 stars 76 forks source link

Rate limit does not have a field called 'message' #32

Closed bryantson closed 2 years ago

bryantson commented 2 years ago

When the code checks for rate limit (https://github.com/mona-actions/gh-repo-stats/blob/main/gh-repo-stats#L651)

  API_REMAINING_MESSAGE=$(echo "${API_REMAINING_REQUEST}" \
    | jq -r '.message' 2>&1)

It is trying to extract message field, but Rate Limit API end point does not have a field message (https://docs.github.com/en/enterprise-cloud@latest/rest/rate-limit#get-rate-limit-status-for-the-authenticated-user), meaning that this will always comes out null.

bryantson commented 2 years ago

NVM. It looks as that field only comes up whenever rate limit is not set.