Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate GitHub Search API in Confirmation Card #15

Open
uptonm opened this issue Oct 24, 2019 · 0 comments
Open

Integrate GitHub Search API in Confirmation Card #15

uptonm opened this issue Oct 24, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@uptonm
Copy link

uptonm commented Oct 24, 2019

API Documentation
GitHub API Search Docs

I would like if users could type in their github username and see their account and profile pic pop up for selection. This would allow for us to get a lot of information very quickly, as well as confirm that the username they put in for their github is correct.

Component Usage
Semantic UI React Docs
CodeSandbox Example

Using semantic-ui-react, the search component would allow for async requests to be made to GitHub's api when the user clicks a search button, then the field would be populated with the filtered results. See the registration card in /app/client/src/components/RegistrationCard/index.tsx for a synchronous example, but it can be easily modified to be async using the loading prop on the search component.

Example Request:

curl https://api.github.com/search/users?q=tom+repos:%3E42+followers:%3E1000

Example Response:

{
  "total_count": 12,
  "incomplete_results": false,
  "items": [
    {
      "login": "mojombo",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png",
      "gravatar_id": "",
      "url": "https://api.github.com/users/mojombo",
      "html_url": "https://github.com/mojombo",
      "followers_url": "https://api.github.com/users/mojombo/followers",
      "subscriptions_url": "https://api.github.com/users/mojombo/subscriptions",
      "organizations_url": "https://api.github.com/users/mojombo/orgs",
      "repos_url": "https://api.github.com/users/mojombo/repos",
      "received_events_url": "https://api.github.com/users/mojombo/received_events",
      "type": "User",
      "score": 105.47857
    }
  ]
}

As an added note, outside of the MVP of this issue would be autofilling this github info based on the user's login provider for our Auth0 implementation i.e. if they logged in to our site with GitHub, we should autofill this field because its stored in the JWT token they use to make authenticated requests.

@uptonm uptonm added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 24, 2019
@uptonm uptonm pinned this issue Oct 24, 2019
@integrate-your-mind integrate-your-mind self-assigned this Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants