Skip to content

Support for GitHub usernames ending in hyphens

Created by: dadlerj

  • Sourcegraph version: latest
  • Platform information: k8s

Reported by https://app.hubspot.com/contacts/2762526/company/430823645

Hey there! Quick question.

We have a user with a GitHub username ending in a hyphen - specifically, $REDACTED.

According to this help page, this username is invalid, but I don't see how this user can log in to Sourcegraph given that.

Is there a workaround, or some way to get around this issue, given that this is a legal username in GitHub?

Apparently GitHub stopped supporting usernames ending in hyphens years ago, but existing users were allowed to keep theirs. E.g. I just tried creating a new user and found this: image

But here's a SO issue from a user who ran into a similar problem with a different service: https://meta.stackoverflow.com/questions/359284/github-usernames-cant-end-with-a-hyphen-but-mine-does

Would it be reasonable for us to normalize by just dropping the ending hyphen, if a username has one?