测试entries

This commit is contained in:
sylor_huang@126.com 2020-03-20 18:14:22 +08:00
parent 505797d7ae
commit 1574659667
1 changed files with 6 additions and 0 deletions

View File

@ -15,9 +15,15 @@ class RepositoriesController < ApplicationController
end
def entries
Rails.logger.info("##############_________project_id_________############{@project.id}")
@project.increment!(:visits)
Rails.logger.info("##############___________@repo.identifier_______############{@repo.identifier}")
Rails.logger.info("##############___________@user_______############{@user.login}")
@ref = params[:branch] || "master"
@entries = Gitea::Repository::Entries::ListService.new(@user, @repo.identifier, ref:@ref).call
Rails.logger.info("##############__________@entries______############{@entries}")
@entries = @entries.sort_by{ |hash| hash['type'] }
end