GitHubAPIClient: scope GET requests to the chosen repo#608
Conversation
60d0b63 to
856dffe
Compare
- add GitHubAPI class - add GitHubAPIClient class - move "get token" functionality to GitHubAPI class - fix failing test_GitSCM_push_get_github_token
856dffe to
456ba02
Compare
c232a88 to
81d2887
Compare
|
This will need some conflict resolution after #604 is merged. |
456ba02 to
69f1574
Compare
| Return: | ||
| dist | list: decoded JSON from the response | ||
| """ | ||
| result = self.client.get(f"{self.repo_base_url}/{path}", *args, **kwargs) |
There was a problem hiding this comment.
This was left out of this method in case there is a non-repo scoped URL that the client needs to access (e.g., repos, users, etc...)
I think there may be a different way to do this that doesn't preclude this ability in the future (e.g., adding self._get_repo method).
There was a problem hiding this comment.
Yep, _get_repo could work. I mainly want to avoid the duplication of the repo_base_url parameter everywhere if we can avoid it, as the Session already has this scope.
1ede676 to
7c1d6a8
Compare
…' into no-bug/scope-get-to-repo
14cb5c3 to
5f83909
Compare
5f83909 to
56a2af8
Compare
merged pr-pilot pr, reverted _get changes, added _repo_get instead
zzzeid
left a comment
There was a problem hiding this comment.
Approving this with the caveat about the one comment (re: _post method) which should be addressed before this is merged.
Co-authored-by: Zeid <2043828+zzzeid@users.noreply.github.com>
Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <zeid@mozilla.com>
Co-authored-by: Zeid <zeid@mozilla.com>
No description provided.