cyberark / conjur-oss-suite-release

Under development - Latest stable releases of the Conjur OSS suite
Apache License 2.0
7 stars 2 forks source link

Log warning message when no Github API token is specified #238

Closed doodlesbykumbi closed 2 years ago

doodlesbykumbi commented 2 years ago

Desired Outcome

A warning serves the dual purpose of informing the user of the possibility of specifying the Github API token, and anticipating a likely failure mode

Example logs:

@doodlesbykumbi ➜ /workspaces/conjur-oss-suite-release (main ✗) $ ./parse-changelogs -v v1.14.1+suite.1 -t release -o RELEASE_NOTES.md
2021/11/15 21:10:19 Starting changelog parser...
2021/11/15 21:10:19 Parsing linked repositories...
2021/11/15 21:10:19 Reading suite.yml...
2021/11/15 21:10:19 Unmarshaling data...
2021/11/15 21:10:19 Releases dir: releases
2021/11/15 21:10:19 Using releases/suite_1.13.1+suite.1.yml as previous release for pinning
2021/11/15 21:10:19 Reading releases/suite_1.13.1+suite.1.yml...
2021/11/15 21:10:19 Unmarshaling data...
2021/11/15 21:10:19 Collecting changelogs...
2021/11/15 21:10:19 WARN: No Github API token specified (via "-p" flag or "GITHUB_TOKEN" environment variable). This run might FAIL due to the API rate limit
2021/11/15 21:10:19 Processing category: Conjur Server
2021/11/15 21:10:19 - Processing repo: cyberark/conjur
2021/11/15 21:10:19   Fetching https://api.github.com/repos/cyberark/conjur/releases...
2021/11/15 21:10:19 ERROR: code 403: https://api.github.com/repos/cyberark/conjur/releases: {"message":"API rate limit exceeded for 51.124.226.40. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
exit status 1

Connected Issue/Story

Resolves -

CyberArk internal issue link: ONYX-14071

Changelog

Test coverage

Documentation

Behavior

N/A

Security