新增:开启流水线模块接口
This commit is contained in:
parent
0e31daf9a8
commit
847e501dee
|
@ -146,6 +146,11 @@ class ProjectsController < ApplicationController
|
||||||
default_branch: @project.default_branch
|
default_branch: @project.default_branch
|
||||||
}
|
}
|
||||||
Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
|
Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
|
||||||
|
elsif project_params.has_key?("has_actions")
|
||||||
|
gitea_params = {
|
||||||
|
has_actions: project_params[:has_actions]
|
||||||
|
}
|
||||||
|
Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
|
||||||
else
|
else
|
||||||
validate_params = project_params.slice(:name, :description,
|
validate_params = project_params.slice(:name, :description,
|
||||||
:project_category_id, :project_language_id, :private, :identifier)
|
:project_category_id, :project_language_id, :private, :identifier)
|
||||||
|
@ -283,7 +288,7 @@ class ProjectsController < ApplicationController
|
||||||
private
|
private
|
||||||
def project_params
|
def project_params
|
||||||
params.permit(:user_id, :name, :description, :repository_name, :website, :lesson_url, :default_branch, :identifier,
|
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, :has_actions)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mirror_params
|
def mirror_params
|
||||||
|
|
Loading…
Reference in New Issue