[CLI] Cache GitHub API responses when running `danger pr`
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 381
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
When running `danger pr ` often locally for testing, caching the JSON response from the GitHub API / making a [conditional request](https://developer.github.com/v3/#conditional-requests) will help prevent [exceeding the rate limit](https://developer.github.com/v3/#rate-limiting).
See https://github.com/danger/danger/issues/198 and https://github.com/danger/danger/commit/b0b18a03fe4b0cdf0bce696b99a6dee24f84cb13 for the corresponding Danger-rb discussion/implementation. We will want to add a [`--clear-http-cache`](https://github.com/danger/danger/blob/v4.1.1/lib/danger/commands/local.rb#L15) flag for parity with Danger-rb.
If this applies to more than just `danger pr`, please chime in!
Contributor guide
Research direction
Begin at the `danger pr ` CLI entry point and inspect the HTTP request path, then compare the Danger-rb implementation linked in the issue. Done means repeated local runs avoid unnecessary GitHub API requests and a `--clear-http-cache` option provides parity; verify behavior with the existing CLI tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100