Skip to content

Draft: API to fetch all GitHub Gists for the user

Kristina Doskich requested to merge 371099-get-list-github-gists into master

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) Screenshot_2022-08-26_at_10.33.59

If the user unauthorized the API responds with 401.

Screenshot_2022-08-26_at_11.36.52

How to set up and validate locally

  1. GET import/github_gist/status.json
  2. 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.

Related to #371099 (closed)

Edited by Kristina Doskich

Merge request reports