Refactor `Projects::CreateService` to accept `repository_object_format`
What does this MR do and why?
Contributes to #419887 (closed)
Problem
The previous implementation of SHA256 support for
Projects::CreateService
is not convenient for future usage from
Projects API endpoint. Users will provide a repository_object_format
parameter
with a desired type instead of a boolean value.
Solution
- Refactor Projects::CreateService interface to accept
repository_object_format
parameter instead of booleanuse_sha256_repository
param. - Adapt a project creation code for this change.
How to set up and validate locally
-
Enable feature flag
Feature.enable(:support_sha256_repositories)
-
Visit create new project page (http://127.0.0.1:3000/projects/new)
-
Select Create blank project
-
Check
Use SHA-256 for repository hashing algorithm
checkbox -
Provide project name and group
-
Click
Create project
button -
The project should be successfully created
-
It should have 64 characters (for SHA256)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.