Skip to content

github: refactor API client to only associate with one token

Warren Gifford requested to merge jc/refactor-github-client-with-one-token into master

Created by: unknwon

This is pure refactoring and should not change any functionality, it simplifies the design of the GitHub client to only associate with exactly one token.

Why?

  1. With the introduction of WithToken method, it is not necessary to pass around the token argument anymore.
  2. Simplifies the management of repository cache, instead of holding a map of caches for different tokens, just one cache object that is associated with the token. Much easier to reason.

NOTE: I'll fix failing tests that require a bit more effort once get approval for the core change.

Merge request reports

Loading