mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-13 21:44:32 +08:00
Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
@@ -135,7 +135,7 @@ class Api::V1::Issues::UpdateService < ApplicationService
|
||||
end
|
||||
|
||||
def build_previous_issue_changes
|
||||
@previous_issue_changes.merge!(@updated_issue.previous_changes.slice("status_id", "priority_id", "fixed_version_id", "issue_tags_value", "branch_name", "subject", "description").symbolize_keys)
|
||||
@previous_issue_changes.merge!(@updated_issue.previous_changes.slice("status_id", "priority_id", "fixed_version_id", "issue_tags_value", "branch_name", "subject").symbolize_keys)
|
||||
if @updated_issue.previous_changes[:start_date].present?
|
||||
@previous_issue_changes.merge!(start_date: [@updated_issue.previous_changes[:start_date][0].to_s, @updated_issue.previous_changes[:start_date][1].to_s])
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Api::V1::Projects::Commits::RecentService < ApplicationService
|
||||
|
||||
attr_reader :project, :page, :limit, :keyword, :owner, :repo, :token
|
||||
attr_accessor :gitea_data
|
||||
attr_accessor :gitea_data, :gitea_repo_detail
|
||||
|
||||
def initialize(project, params, token=nil)
|
||||
@project = project
|
||||
@@ -15,8 +15,9 @@ class Api::V1::Projects::Commits::RecentService < ApplicationService
|
||||
|
||||
def call
|
||||
load_gitea_data
|
||||
load_gitea_repo_detail
|
||||
|
||||
gitea_data
|
||||
{result: gitea_data, detail:gitea_repo_detail}
|
||||
end
|
||||
|
||||
private
|
||||
@@ -36,4 +37,8 @@ class Api::V1::Projects::Commits::RecentService < ApplicationService
|
||||
raise Error, "获取最近提交列表失败" unless @gitea_data.is_a?(Hash)
|
||||
end
|
||||
|
||||
def load_gitea_repo_detail
|
||||
@gitea_repo_detail = $gitea_client.get_repos_by_owner_repo(owner, repo, {query: {access_token: token}})
|
||||
raise Error, "获取项目详情失败" unless @gitea_repo_detail.is_a?(Hash)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user