修复:恢复auto_init

This commit is contained in:
2024-03-06 16:27:43 +08:00
parent dd96e1e2da
commit 0e31daf9a8
4 changed files with 6 additions and 7 deletions

View File

@@ -61,8 +61,7 @@ class Projects::CreateService < ApplicationService
{
hidden: !repo_is_public,
user_id: params[:user_id],
identifier: params[:repository_name],
auto_init: params[:auto_init]
identifier: params[:repository_name]
}
end

View File

@@ -75,7 +75,7 @@ class Repositories::CreateService < ApplicationService
name: params[:identifier],
private: params[:hidden],
# readme: "ReadMe",
auto_init: params[:auto_init],
"auto_init": true,
# "description": "string",
# "gitignores": "string",
# "issue_labels": "string",
@@ -89,7 +89,7 @@ class Repositories::CreateService < ApplicationService
license = project.license
hash = hash.merge(license: license.name) if license
hash = hash.merge(gitignores: ignore.name) if ignore
hash = hash.merge(auto_init: true) if ignore && license
hash = hash.merge(auto_init: true) if ignore || license
hash
end
end