Merge branch 'standalone_develop' into pm_project_develop
This commit is contained in:
commit
41e9f00138
|
@ -193,6 +193,11 @@ class ProjectsController < ApplicationController
|
|||
default_branch: @project.default_branch
|
||||
}
|
||||
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
|
||||
validate_params = project_params.slice(:name, :description,
|
||||
:project_category_id, :project_language_id, :private, :identifier)
|
||||
|
@ -338,7 +343,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
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, :has_actions,
|
||||
:blockchain, :blockchain_token_all, :blockchain_init_token, :pr_view_admin)
|
||||
end
|
||||
|
||||
|
|
|
@ -182,14 +182,6 @@ class Organization < Owner
|
|||
organization_users.count
|
||||
end
|
||||
|
||||
def teams_count
|
||||
teams.count
|
||||
end
|
||||
|
||||
def organization_users_count
|
||||
organization_users.count
|
||||
end
|
||||
|
||||
def real_name
|
||||
name = lastname + firstname
|
||||
name = name.blank? ? (nickname.blank? ? login : nickname) : name
|
||||
|
@ -217,4 +209,11 @@ class Organization < Owner
|
|||
enabling_cla == true
|
||||
end
|
||||
|
||||
def num_users
|
||||
organization_user_ids = self.organization_users.pluck(:user_id).uniq
|
||||
project_member_user_ids = self.projects.joins(:members).pluck("members.user_id").uniq
|
||||
ids = organization_user_ids + project_member_user_ids
|
||||
ids.uniq.size
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -15,8 +15,8 @@ if @result_object[:data]["Runs"].present?
|
|||
end
|
||||
|
||||
json.status run["Status"]
|
||||
json.time_ago time_from_now(run["Stopped"])
|
||||
json.holding_time run["Stopped"]-run["Started"]
|
||||
json.time_ago time_from_now(run["Created"])
|
||||
json.holding_time run["Status"] == 6 ? Time.now.to_i - run["Created"] : run["Stopped"] - run["Created"]
|
||||
end
|
||||
else
|
||||
json.runs []
|
||||
|
|
Loading…
Reference in New Issue