Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
958ee42fa2
|
@ -2,7 +2,8 @@ class Api::V1::Projects::Pulls::ReviewsController < Api::V1::Projects::Pulls::Ba
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@reviews = @pull_request.reviews
|
@reviews = @pull_request.reviews
|
||||||
@reviews = kaminari_paginate(@reviews)
|
@reviews = @reviews.where(status: params[:status]) if params[:status].present?
|
||||||
|
# @reviews = kaminari_paginate(@reviews)
|
||||||
end
|
end
|
||||||
|
|
||||||
before_action :require_reviewer, only: [:create]
|
before_action :require_reviewer, only: [:create]
|
||||||
|
|
|
@ -1029,6 +1029,7 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/3/reviews.json')
|
||||||
|owner |是| |string |用户登录名 |
|
|owner |是| |string |用户登录名 |
|
||||||
|repo |是| |string |项目标识identifier |
|
|repo |是| |string |项目标识identifier |
|
||||||
|index |是| | int |合并请求序号|
|
|index |是| | int |合并请求序号|
|
||||||
|
|status |否| |string |审查类型, common: 评论类型, approved: 已通过, rejected: 已拒绝|
|
||||||
|
|
||||||
### 返回字段说明:
|
### 返回字段说明:
|
||||||
参数 | 类型 | 字段说明
|
参数 | 类型 | 字段说明
|
||||||
|
@ -1373,7 +1374,7 @@ await octokit.request('POST /api/v1/yystopf/ceshi/pulls/1/journals.json')
|
||||||
|index |是| | integer|合并请求序号|
|
|index |是| | integer|合并请求序号|
|
||||||
|type |是| | string |评论类型 comment: 普通, problem: 需要回应的评论|
|
|type |是| | string |评论类型 comment: 普通, problem: 需要回应的评论|
|
||||||
|note |否| | string |评论内容|
|
|note |否| | string |评论内容|
|
||||||
|review_id |是| | string |审查ID|
|
|review_id |否| | string |审查ID|
|
||||||
|line_code |否| | string |行号|
|
|line_code |否| | string |行号|
|
||||||
|commit_id |否| | bool |commitID|
|
|commit_id |否| | bool |commitID|
|
||||||
|path |否| | integer|文件路径|
|
|path |否| | integer|文件路径|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class Api::V1::Projects::Pulls::Journals::CreateService < ApplicationService
|
||||||
|
|
||||||
def call
|
def call
|
||||||
raise Error, errors.full_messages.join(", ") unless valid?
|
raise Error, errors.full_messages.join(", ") unless valid?
|
||||||
check_review_is_exists
|
check_review_is_exists if review_id.present?
|
||||||
if type == 'problem'
|
if type == 'problem'
|
||||||
create_problem_journal
|
create_problem_journal
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
json.total_count @reviews.total_count
|
# json.total_count @reviews.total_count
|
||||||
|
json.total_count @reviews.count
|
||||||
json.reviews @reviews.each do |review|
|
json.reviews @reviews.each do |review|
|
||||||
json.partial! 'api/v1/projects/pulls/reviews/simple_detail', review: review
|
json.partial! 'api/v1/projects/pulls/reviews/simple_detail', review: review
|
||||||
end
|
end
|
|
@ -14557,6 +14557,13 @@ http://localhost:3000/api/v1/yystopf/ceshi_commit/pulls/3/versions/33/diff.json
|
||||||
<td>int</td>
|
<td>int</td>
|
||||||
<td>合并请求序号</td>
|
<td>合并请求序号</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>status</td>
|
||||||
|
<td>否</td>
|
||||||
|
<td></td>
|
||||||
|
<td>string</td>
|
||||||
|
<td>审查类型, common: 评论类型, approved: 已通过, rejected: 已拒绝</td>
|
||||||
|
</tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
<h3 id='7447e4874e-7'>返回字段说明:</h3>
|
<h3 id='7447e4874e-7'>返回字段说明:</h3>
|
||||||
<table><thead>
|
<table><thead>
|
||||||
|
@ -15303,7 +15310,7 @@ http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals.json
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>review_id</td>
|
<td>review_id</td>
|
||||||
<td>是</td>
|
<td>否</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
<td>审查ID</td>
|
<td>审查ID</td>
|
||||||
|
|
Loading…
Reference in New Issue