Skip to content

Add 3-segment format for gl_repository

Mark Chao requested to merge 215315-repository-identifier-2 into master

What does this MR do?

Implements #215315 (closed), a new gl_repository format:
[repository holder class]-[repository holder id]-[repository type], where:

  • repository holder class would be the active record class name (e.g. "project")
  • repository holder id would be the active record id (e.g. 7)
  • repository type indicates it being code, wiki or design.

So project 7's wiki could be represented as project-7-wiki.

Backward compatibility is implemented so the old 2-segment format would still work.

The IdentifierParser is extracted as its own object, because I find we repeatedly do split at different places, and wrapping this as object helps caching this result.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by 🤖 GitLab Bot 🤖

Merge request reports