mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
新增:创建项目auto_init参数
This commit is contained in:
@@ -283,7 +283,7 @@ class ProjectsController < ApplicationController
|
||||
private
|
||||
def project_params
|
||||
params.permit(:user_id, :name, :description, :repository_name, :website, :lesson_url, :default_branch, :identifier,
|
||||
:project_category_id, :project_language_id, :license_id, :ignore_id, :private)
|
||||
:project_category_id, :project_language_id, :license_id, :ignore_id, :private, :auto_init)
|
||||
end
|
||||
|
||||
def mirror_params
|
||||
|
||||
@@ -60,8 +60,9 @@ class RepositoriesController < ApplicationController
|
||||
@entries = Gitea::Repository::Entries::ListService.new(@owner, @project.identifier, ref: @ref).call
|
||||
@entries = @entries.present? ? @entries.sort_by{ |hash| hash['type'] } : []
|
||||
@path = GiteaService.gitea_config[:domain]+"/#{@project.owner.login}/#{@project.identifier}/raw/branch/#{@ref}/"
|
||||
@repo_detail = $gitea_client.get_repos_by_owner_repo(@owner.login, @project.identifier)
|
||||
return render_not_found if @entries.blank? && !@repo_detail["empty"]
|
||||
end
|
||||
return render_not_found if @entries.blank?
|
||||
end
|
||||
|
||||
def top_counts
|
||||
|
||||
Reference in New Issue
Block a user