新增: pr 最后一次审核展示

This commit is contained in:
yystopf 2022-07-07 09:24:11 +08:00
parent 7b91ad37e5
commit 1d6d48fc94
2 changed files with 6 additions and 4 deletions

View File

@ -9,7 +9,7 @@ class RepositoriesController < ApplicationController
before_action :load_repository before_action :load_repository
before_action :authorizate!, except: [:sync_mirror, :tags, :commit, :archive] before_action :authorizate!, except: [:sync_mirror, :tags, :commit, :archive]
before_action :authorizate_user_can_edit_repo!, only: %i[sync_mirror] before_action :authorizate_user_can_edit_repo!, only: %i[sync_mirror]
before_action :get_ref, only: %i[entries sub_entries top_counts file archive] before_action :get_ref, only: %i[entries sub_entries top_counts files archive]
before_action :get_latest_commit, only: %i[entries sub_entries top_counts] before_action :get_latest_commit, only: %i[entries sub_entries top_counts]
before_action :get_statistics, only: %i[top_counts] before_action :get_statistics, only: %i[top_counts]

View File

@ -15,10 +15,12 @@ json.author do
json.partial! 'users/user_simple', user: @issue_user json.partial! 'users/user_simple', user: @issue_user
end end
if @last_review.present?
json.last_review do json.last_review do
json.(@last_review, :id, :commit_id, :content, :status) json.(@last_review, :id, :commit_id, :content, :status)
json.created_at format_time(@last_review.created_at) json.created_at format_time(@last_review.created_at)
end end
end
json.pull_request do json.pull_request do
json.extract! @pull_request, :id,:base, :head, :status,:fork_project_id, :is_original json.extract! @pull_request, :id,:base, :head, :status,:fork_project_id, :is_original