Skip to content

graphqlbackend: initial on-prem user invites collaborator discovery backend

Warren Gifford requested to merge sg/on-prem-user-invites into main

Created by: slimsag

This is the initial backend for on-prem user invites' collaborator discovery.

Unlike the one we use for Cloud signup, which uses the GitHub API to find collaborators (because the repos are not yet cloned on Sourcegraph), this API leverages gitserver instead since the repositories are cloned. We look at recent committers from 25 of the users' most starred repositories.

This is quite fast, completing in under a few hundred milliseconds.

One drawback here, however, is that we do not get profile pictures currently. Because these users do not exist on Sourcegraph, and we only have their email address, we don't have any simple way to get their profile picture. The GitHub API is not suitable for fetching this information, either, and so instead we fallback to Gravatar images which are better than nothing.

Signed-off-by: Stephen Gutekanst [email protected]

Test plan

Unit tests added + manual testing

Merge request reports

Loading