add: project commit_slice

This commit is contained in:
2021-09-08 09:45:15 +08:00
parent 91feb8cf89
commit af7488505d
4 changed files with 86 additions and 0 deletions

View File

@@ -107,6 +107,11 @@ class RepositoriesController < ApplicationController
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token).call
end
def commits_slice
@hash_commit = Gitea::Repository::Commits::ListSliceService.call(@owner.login, @project.identifier,
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token)
end
def commit
@sha = params[:sha]
@commit = Gitea::Repository::Commits::GetService.call(@owner.login, @repository.identifier, @sha, current_user&.gitea_token)