@@ -25,16 +25,16 @@ const (
25
25
// Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0)
26
26
CommentTypeComment CommentType = iota
27
27
CommentTypeReopen
28
- COMMENT_TYPE_CLOSE
28
+ CommentTypeClose
29
29
30
30
// References.
31
- COMMENT_TYPE_ISSUE_REF
31
+ CommentTypeIssueRef
32
32
// Reference from a commit (not part of a pull request)
33
- COMMENT_TYPE_COMMIT_REF
33
+ CommentTypeCommitRef
34
34
// Reference from a comment
35
35
CommentTypeComment_REF
36
36
// Reference from a pull request
37
- COMMENT_TYPE_PULL_REF
37
+ CommentTypePullRef
38
38
)
39
39
40
40
type CommentTag int
@@ -43,7 +43,7 @@ const (
43
43
CommentTagNone CommentTag = iota
44
44
CommentTagPoster
45
45
CommentTagWriter
46
- COMMENT_TAG_OWNER
46
+ CommentTagOwner
47
47
)
48
48
49
49
// Comment represents a comment in commit and issue page.
@@ -231,7 +231,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
231
231
return nil , err
232
232
}
233
233
234
- case COMMENT_TYPE_CLOSE :
234
+ case CommentTypeClose :
235
235
act .OpType = ActionCloseIssue
236
236
if opts .Issue .IsPull {
237
237
act .OpType = ActionClosePullRequest
@@ -260,7 +260,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
260
260
}
261
261
262
262
func createStatusComment (e * xorm.Session , doer * User , repo * Repository , issue * Issue ) (* Comment , error ) {
263
- cmtType := COMMENT_TYPE_CLOSE
263
+ cmtType := CommentTypeClose
264
264
if ! issue .IsClosed {
265
265
cmtType = CommentTypeReopen
266
266
}
@@ -321,7 +321,7 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi
321
321
322
322
// Check if same reference from same commit has already existed.
323
323
has , err := x .Get (& Comment {
324
- Type : COMMENT_TYPE_COMMIT_REF ,
324
+ Type : CommentTypeCommitRef ,
325
325
IssueID : issue .ID ,
326
326
CommitSHA : commitSHA ,
327
327
})
@@ -332,7 +332,7 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi
332
332
}
333
333
334
334
_ , err = CreateComment (& CreateCommentOptions {
335
- Type : COMMENT_TYPE_COMMIT_REF ,
335
+ Type : CommentTypeCommitRef ,
336
336
Doer : doer ,
337
337
Repo : repo ,
338
338
Issue : issue ,
0 commit comments