Browse Source

FIX get repository api bug

tags/v1
Jasder 6 years ago
parent
commit
ffa4a948ee
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/repositories_controller.rb

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

@@ -10,7 +10,8 @@ class RepositoriesController < ApplicationController
def show
@branches_count = Gitea::Repository::BranchesService.new(@project.owner, @project.identifier).call&.size
@commits_count = Gitea::Repository::Commits::ListService.new(@project.owner, @project.identifier).call[:total_count]
@commits_count = Gitea::Repository::Commits::ListService.new(@project.owner.login, @project.identifier,
sha: params[:sha], page: params[:page], limit: params[:limit], token: current_user&.gitea_token).call[:total_count]
@tags_count = Gitea::Repository::Tags::ListService.new(current_user&.gitea_token, @project.owner.login, @project.identifier).call&.size
@result = Gitea::Repository::GetService.new(@project.owner, @project.identifier).call
@project_fork_id = @project.try(:forked_from_project_id)


Loading…
Cancel
Save