From a1fb5fb39af7c1d89b864374a5a905d3429848fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Flc=E3=82=9B?= Date: Thu, 29 Aug 2024 10:41:13 +0800 Subject: [PATCH] feat(api/comment): added `CommentEntryTypeMiniItems` for mini_items(#11) --- api_comment.go | 15 ++++++++------- api_comment_test.go | 1 + features.md | 8 ++++---- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/api_comment.go b/api_comment.go index 0169fcf..d073477 100644 --- a/api_comment.go +++ b/api_comment.go @@ -5,16 +5,17 @@ import ( "net/http" ) -// CommentEntryType 评论类型(取值: bug、 bug_remark (流转缺陷时候的评论)、 stories、 tasks 。多个类型间以竖线隔开) +// CommentEntryType 评论类型 type CommentEntryType string -// CommentEntryType 评论类型(取值: bug、 bug_remark (流转缺陷时候的评论)、 stories、 tasks 。多个类型间以竖线隔开) +// CommentEntryType 评论类型 const ( - CommentEntryTypeBug CommentEntryType = "bug" - CommentEntryTypeBugRemark CommentEntryType = "bug_remark" - CommentEntryTypeStories CommentEntryType = "stories" - CommentEntryTypeTasks CommentEntryType = "tasks" - CommentEntryTypeWiki CommentEntryType = "wiki" + CommentEntryTypeBug CommentEntryType = "bug" // bug + CommentEntryTypeBugRemark CommentEntryType = "bug_remark" // bug_remark (流转缺陷时候的评论) + CommentEntryTypeStories CommentEntryType = "stories" // stories + CommentEntryTypeTasks CommentEntryType = "tasks" // tasks + CommentEntryTypeWiki CommentEntryType = "wiki" // wiki + CommentEntryTypeMiniItems CommentEntryType = "mini_items" // mini_items ) // String CommentEntryType to string diff --git a/api_comment_test.go b/api_comment_test.go index b60ec11..caa3c60 100644 --- a/api_comment_test.go +++ b/api_comment_test.go @@ -14,6 +14,7 @@ func TestCommentService_CommentEntryType(t *testing.T) { assert.Equal(t, "stories", CommentEntryTypeStories.String()) assert.Equal(t, "tasks", CommentEntryTypeTasks.String()) assert.Equal(t, "wiki", CommentEntryTypeWiki.String()) + assert.Equal(t, "mini_items", CommentEntryTypeMiniItems.String()) } func TestCommentService_CreateComment(t *testing.T) { diff --git a/features.md b/features.md index d48b25d..d869f0d 100644 --- a/features.md +++ b/features.md @@ -316,10 +316,10 @@ ### 评论 -- [ ] 添加评论 -- [ ] 更新评论 -- [ ] 获取评论 -- [ ] 获取评论数量 +- [x] 添加评论 +- [x] 更新评论 +- [x] 获取评论 +- [x] 获取评论数量 ### 附件