Skip to content

Refactor Gitlab::Identifier

Yorick Peterse requested to merge test-improve-gitlab-identifier into master

What does this MR do?

This refactors Gitlab::Identifier so that it:

  1. Has tests
  2. Caches output in an instance variable to reduce queries
  3. Uses only a single query to find a user by an SSH key, instead of 2

Why was this MR needed?

This code was untested and would execute more SQL queries than needed.

Does this MR meet the acceptance criteria?

Merge request reports