Skip to content

FetchAccount method implementation for Gerrit

Administrator requested to merge mlw-Gerrit-auth-provider into main

Created by: mollylogue

Implementing FetchAccount for the Gerrit auth provider.

Closes https://github.com/sourcegraph/sourcegraph/issues/35743

Outstanding questions/thoughts:

  • What exactly should we be pulling in from Gerrit for each account? It seems that username, email, and account id is sufficient (and might be more than we need). I'm guessing as we implement the other methods of the provider interface it will become more clear what exactly we need.
  • Does the approach of querying the Gerrit api first for the username matching the sourcegraph user and then querying for accounts matching one of the verified emails make sense? We basically return as soon as we find something that matches, which seems to go along with the implementation for Perforce I'm happy to adjust this if we want or if there's a better approach.

Test plan

  • Manual testing locally against dogfood Gerrit instance
  • Unit tests
  • Eventual end-to-end/integration tests once the rest of the methods for this provider are implemented and the approach is solidified.

Merge request reports

Loading