Skip to content

Remove main users of Repository#repo_type

Nick Thomas requested to merge 201886-remove-repo-type-from-after-import into master

What does this MR do?

Repository#repo_type is a bit of information that tells people what role the repository plays. However, we strongly want people to treat all repositories the same, as much as practicable, so having this information in the repository is a bit of a mistake. In particular, some operations are project-only, or wiki-only, but the variety of repositories we have is increasing rapidly, and this coupling hurts us everywhere when we add a new repo type.

This MR takes a significant step towards removing Repository#repo_type by removing one internal use (Repository#after_import) and all uses in Commit. There are too many other users of Repository#repo_type to fix them all in a single attempt, but this is a significant step forwards.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Nick Thomas

Merge request reports