Draft: API to fetch all GitHub Gists for the user
What does this MR do and why?
It adds a new endpoint GET import/github_gist/status.json
to fetch all Github Gists for an authorized user issue
The authorization mechanism was moved from Import::GithubController
to Import::GithubOauth
concern to be able to reuse it.
Screenshots or screen recordings
It returns the list of all user's gists when the user is authorized. The response body, for now, includes only provider_gists
. Additional imported_gists
will be added once the import of at least one gist is done. (To be consistent with getting GitHub repositories response body structure)
If the user unauthorized the API responds with 401.
How to set up and validate locally
- GET import/github_gist/status.json
- To authorize with GitHub use existing
/import/github/new
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #371099 (closed)