Skip to content

Commit 64196d4

Browse files
committed
More overlooks
1 parent f14232d commit 64196d4

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

models/issue_comment.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const (
2525
// Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0)
2626
CommentTypeComment CommentType = iota
2727
CommentTypeReopen
28-
COMMENT_TYPE_CLOSE
28+
CommentTypeClose
2929

3030
// References.
31-
COMMENT_TYPE_ISSUE_REF
31+
CommentTypeIssueRef
3232
// Reference from a commit (not part of a pull request)
33-
COMMENT_TYPE_COMMIT_REF
33+
CommentTypeCommitRef
3434
// Reference from a comment
3535
CommentTypeComment_REF
3636
// Reference from a pull request
37-
COMMENT_TYPE_PULL_REF
37+
CommentTypePullRef
3838
)
3939

4040
type CommentTag int
@@ -43,7 +43,7 @@ const (
4343
CommentTagNone CommentTag = iota
4444
CommentTagPoster
4545
CommentTagWriter
46-
COMMENT_TAG_OWNER
46+
CommentTagOwner
4747
)
4848

4949
// Comment represents a comment in commit and issue page.
@@ -231,7 +231,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
231231
return nil, err
232232
}
233233

234-
case COMMENT_TYPE_CLOSE:
234+
case CommentTypeClose:
235235
act.OpType = ActionCloseIssue
236236
if opts.Issue.IsPull {
237237
act.OpType = ActionClosePullRequest
@@ -260,7 +260,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
260260
}
261261

262262
func createStatusComment(e *xorm.Session, doer *User, repo *Repository, issue *Issue) (*Comment, error) {
263-
cmtType := COMMENT_TYPE_CLOSE
263+
cmtType := CommentTypeClose
264264
if !issue.IsClosed {
265265
cmtType = CommentTypeReopen
266266
}
@@ -321,7 +321,7 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi
321321

322322
// Check if same reference from same commit has already existed.
323323
has, err := x.Get(&Comment{
324-
Type: COMMENT_TYPE_COMMIT_REF,
324+
Type: CommentTypeCommitRef,
325325
IssueID: issue.ID,
326326
CommitSHA: commitSHA,
327327
})
@@ -332,7 +332,7 @@ func CreateRefComment(doer *User, repo *Repository, issue *Issue, content, commi
332332
}
333333

334334
_, err = CreateComment(&CreateCommentOptions{
335-
Type: COMMENT_TYPE_COMMIT_REF,
335+
Type: CommentTypeCommitRef,
336336
Doer: doer,
337337
Repo: repo,
338338
Issue: issue,

routers/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ func ViewIssue(ctx *context.Context) {
612612

613613
if repo.IsOwnedBy(comment.PosterID) ||
614614
(repo.Owner.IsOrganization() && repo.Owner.IsOwnedBy(comment.PosterID)) {
615-
comment.ShowTag = models.COMMENT_TAG_OWNER
615+
comment.ShowTag = models.CommentTagOwner
616616
} else if comment.Poster.IsWriterOfRepo(repo) {
617617
comment.ShowTag = models.CommentTagWriter
618618
} else if comment.PosterID == issue.PosterID {

0 commit comments

Comments
 (0)