FIX sha value bug
This commit is contained in:
parent
97973b95bf
commit
939f33a8a2
|
@ -82,8 +82,9 @@ class RepositoriesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit
|
def commit
|
||||||
@commit = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, params[:sha], current_user.gitea_token)
|
@sha = params[:sha]
|
||||||
@commit_diff = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, params[:sha], current_user.gitea_token, {diff: true})
|
@commit = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, current_user.gitea_token)
|
||||||
|
@commit_diff = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, current_user.gitea_token, {diff: true})
|
||||||
end
|
end
|
||||||
|
|
||||||
def tags
|
def tags
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
json.files_count @commit_diff['NumFiles']
|
json.files_count @commit_diff['NumFiles']
|
||||||
json.total_addition @commit_diff['TotalAddition']
|
json.total_addition @commit_diff['TotalAddition']
|
||||||
json.total_deletion @commit_diff['TotalDeletion']
|
json.total_deletion @commit_diff['TotalDeletion']
|
||||||
json.files @commit_diff['Files'], partial: 'pull_requests/diff_file', as: :file, locals: {sha: ""}
|
json.files @commit_diff['Files'], partial: 'pull_requests/diff_file', as: :file, locals: {sha: @sha}
|
||||||
|
|
||||||
json.partial! 'commit', commit: @commit, project: @project
|
json.partial! 'commit', commit: @commit, project: @project
|
||||||
json.parents @commit['parents'] do |parent|
|
json.parents @commit['parents'] do |parent|
|
||||||
|
|
Loading…
Reference in New Issue