修复: 缺少title和body

This commit is contained in:
yystopf 2022-07-26 14:38:41 +08:00
parent e72273f3b2
commit 6183f1f76d
4 changed files with 38 additions and 2 deletions

View File

@ -30,6 +30,8 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls/1.json')
--------- | ----------- | -----------
|-|-|-|
|id |int|合并请求ID|
|title |string|合并请求标题|
|body| |string|合并请求内容|
|head |int|合并请求源分支|
|base |int|合并请求目标分支|
|index |int|合并请求序号|
@ -505,6 +507,8 @@ await octokit.request('GET /api/v1/yystopf/ceshi_commit/pulls.json')
|-|-|-|
|total_count |int|合并请求总数|
|id |int|合并请求ID|
|title |string|合并请求标题|
|body |string|合并请求内容|
|head |int|合并请求源分支|
|base |int|合并请求目标分支|
|index |int|合并请求序号|
@ -939,6 +943,8 @@ await octokit.request('POST /api/v1/yystopf/ceshi/pulls/1/reviews.json')
--------- | ----------- | -----------
|reviewer |object |审查者 |
|pull_request.id |integer|合并请求ID|
|pull_request.title |string|合并请求标题|
|pull_request.body |string|合并请求内容|
|pull_request.head |string|合并请求源分支|
|pull_request.base |string|合并请求目标分支|
|pull_request.is_original |string|合并请求是否从fork仓库所来|

View File

@ -11,7 +11,7 @@ class Api::V1::Projects::Pulls::ListService < ApplicationService
def initialize(project, params={})
@project = project
@keyword = params[:keyword]
@status = params[:status].to_i
@status = params[:status].present? ? params[:status].to_i : nil
@priority_id = params[:priority_id]
@issue_tag_id = params[:issue_tag_id]
@version_id = params[:version_id]

View File

@ -1,4 +1,4 @@
json.(pull, :id, :head, :base, :is_original)
json.(pull, :id, :title, :body, :head, :base, :is_original)
json.index pull.gitea_number
json.status pull.status == 1 ? "merged" : (pull.status == 2 ? "closed" : "open")

View File

@ -12079,6 +12079,16 @@ http://localhost:3000/api/v1/yystopf/ceshi/webhooks/3/tests.json
<td>合并请求ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>合并请求标题</td>
</tr>
<tr>
<td>body</td>
<td></td>
<td>string</td>
</tr>
<tr>
<td>head</td>
<td>int</td>
<td>合并请求源分支</td>
@ -13116,6 +13126,16 @@ http://localhost:3000/api/Jason/test-txt/compare/master...Jason/test-txt:develop
<td>合并请求ID</td>
</tr>
<tr>
<td>title</td>
<td>string</td>
<td>合并请求标题</td>
</tr>
<tr>
<td>body</td>
<td>string</td>
<td>合并请求内容</td>
</tr>
<tr>
<td>head</td>
<td>int</td>
<td>合并请求源分支</td>
@ -14007,6 +14027,16 @@ http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/reviews.json
<td>合并请求ID</td>
</tr>
<tr>
<td>pull_request.title</td>
<td>string</td>
<td>合并请求标题</td>
</tr>
<tr>
<td>pull_request.body</td>
<td>string</td>
<td>合并请求内容</td>
</tr>
<tr>
<td>pull_request.head</td>
<td>string</td>
<td>合并请求源分支</td>