Browse Source

测试commits报错

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
f9f5b9fdb7
3 changed files with 5 additions and 2 deletions
  1. +3
    -1
      app/controllers/repositories_controller.rb
  2. +0
    -1
      app/services/gitea/client_service.rb
  3. +2
    -0
      app/services/gitea/repository/commits/list_service.rb

+ 3
- 1
app/controllers/repositories_controller.rb View File

@@ -38,7 +38,9 @@ class RepositoriesController < ApplicationController
end
def commits
@hash_commit = Gitea::Repository::Commits::ListService.new(@project.owner, @project.identifier, sha: params[:sha], page: params[:page]).call
hash_commit = Gitea::Repository::Commits::ListService.new(@project.owner, @project.identifier, sha: params[:sha], page: params[:page]).call
Rails.logger.info("##########__________hash_commit__________########{hash_commit}")
@hash_commit = hash_commit
end
def single_commit


+ 0
- 1
app/services/gitea/client_service.rb View File

@@ -28,7 +28,6 @@ class Gitea::ClientService < ApplicationService
end

def get(url, params={})
Rails.logger.info("##########__________get_params__________########{params}")
auth_token = authen_params(params[:token])
conn(auth_token).get do |req|
req.url full_url(url)


+ 2
- 0
app/services/gitea/repository/commits/list_service.rb View File

@@ -24,6 +24,8 @@ class Gitea::Repository::Commits::ListService < Gitea::ClientService
end

def render_result(response)
Rails.logger.info("#####___________response.status_________##########{response.status}")
Rails.logger.info("#####___________response.body_________##########{response.body}")
body = JSON.parse(response.body)
case response.status
when 200


Loading…
Cancel
Save