mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
FIX update git commit api for gitea platform
This commit is contained in:
@@ -49,7 +49,6 @@ class RepositoriesController < ApplicationController
|
||||
|
||||
def commit
|
||||
@commit = Gitea::Repository::Commits::GetService.new(@repo.user.login, @repo.identifier, params[:sha], current_user.gitea_token).call
|
||||
@custom_commit = Gitea::Repository::Commits::GetService.new(@repo.user.login, @repo.identifier, params[:sha], current_user.gitea_token, true).call
|
||||
end
|
||||
|
||||
def tags
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
json.key_format! camelize: :lower
|
||||
json.additions @custom_commit['TotalAddition']
|
||||
json.deletions @custom_commit['TotalDeletion']
|
||||
json.additions @commit['commit_diff']['TotalAddition']
|
||||
json.deletions @commit['commit_diff']['TotalDeletion']
|
||||
json.sha @commit['sha']
|
||||
json.url request.url
|
||||
json.commit do
|
||||
@@ -23,4 +23,4 @@ json.parents @commit['parents'] do |parent|
|
||||
json.url EduSetting.get('host_name') + commit_repository_path(@repo, parent['sha'])
|
||||
end
|
||||
|
||||
json.files @custom_commit['Files']
|
||||
json.files @commit['commit_diff']['Files']
|
||||
|
||||
Reference in New Issue
Block a user