Skip to content

Commit

Permalink
feat(api/comment): added CommentEntryTypeMiniItems for mini_items(#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 authored Aug 29, 2024
1 parent 6d8b16c commit a1fb5fb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
15 changes: 8 additions & 7 deletions api_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions api_comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@

### 评论

- [ ] 添加评论
- [ ] 更新评论
- [ ] 获取评论
- [ ] 获取评论数量
- [x] 添加评论
- [x] 更新评论
- [x] 获取评论
- [x] 获取评论数量

### 附件

Expand Down

0 comments on commit a1fb5fb

Please sign in to comment.