opensource icon indicating copy to clipboard operation
opensource copied to clipboard

User that change their login (username) cause undesired side effects

Open rmariuzzo opened this issue 6 years ago • 2 comments

GitHub allow users to change their login (username). While doing this, GitHub retain repos with the old username, when accessed, GitHub does a 301 redirect.

However, here we need to identify users by their unique id and not their volatile login name.

rmariuzzo avatar Oct 28 '17 15:10 rmariuzzo

Was this fixed in #91 ?

Zerquix18 avatar Oct 11 '18 00:10 Zerquix18

A possible solution could be to get the repositories while it searches the users, for example,

{
  search(type: USER, query: $query, first: 100) {
    userCount
    nodes {
      __typename
      ... on User {
        id
        login
        name
        repositories(isFork: false, first: 10) {
          __typename
          nodes {
            ... on Repository {
              id
              name: nameWithOwner
              url
            }
          }
        }
      }
    }
  }
}

In this scenario, we get the information that it is not being updated through the searchRepos query.

mecm1993 avatar Jun 14 '19 19:06 mecm1993