From a9811768d42718c5c614623314471a9e98a4a0b7 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 4 Aug 2022 15:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E8=AF=84=E8=AE=BA=E7=B1=BB=E5=9E=8B=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/docs/slate/source/includes/_pulls.md | 2 +- app/services/api/v1/projects/pulls/journals/create_service.rb | 2 +- public/docs/api.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/docs/slate/source/includes/_pulls.md b/app/docs/slate/source/includes/_pulls.md index 9733f958b..ecc9c285a 100644 --- a/app/docs/slate/source/includes/_pulls.md +++ b/app/docs/slate/source/includes/_pulls.md @@ -1372,7 +1372,7 @@ await octokit.request('POST /api/v1/yystopf/ceshi/pulls/1/journals.json') |owner |是| | string |用户登录名 | |repo |是| | string |项目标识identifier | |index |是| | integer|合并请求序号| -|type |是| | string |评论类型 comment: 普通, problem: 需要回应的评论| +|type |否|comment| string |评论类型 comment: 普通, problem: 需要回应的评论| |note |否| | string |评论内容| |review_id |否| | string |审查ID| |line_code |否| | string |行号| diff --git a/app/services/api/v1/projects/pulls/journals/create_service.rb b/app/services/api/v1/projects/pulls/journals/create_service.rb index 7b0401c90..df207771b 100644 --- a/app/services/api/v1/projects/pulls/journals/create_service.rb +++ b/app/services/api/v1/projects/pulls/journals/create_service.rb @@ -15,7 +15,7 @@ class Api::V1::Projects::Pulls::Journals::CreateService < ApplicationService @note = params[:note] @commit_id = params[:commit_id] @path = params[:path] - @type = params[:type] + @type = params[:type] || "comment" @diff = params[:diff] @review_id = params[:review_id] @user = user diff --git a/public/docs/api.html b/public/docs/api.html index 943f8c361..c2e6e4270 100644 --- a/public/docs/api.html +++ b/public/docs/api.html @@ -14993,8 +14993,8 @@ http://localhost:3000/api/v1/yystopf/ceshi/pulls/1/journals.json type -是 - +否 +comment string 评论类型 comment: 普通, problem: 需要回应的评论