This reverts commit 3cab3bee57
.
This commit is contained in:
parent
3c7908b51c
commit
35cc82abbf
4 changed files with 24 additions and 151 deletions
|
@ -712,7 +712,6 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err
|
|||
RefAction: opts.RefAction,
|
||||
RefIsPull: opts.RefIsPull,
|
||||
IsForcePush: opts.IsForcePush,
|
||||
Invalidated: opts.Invalidated,
|
||||
}
|
||||
if _, err = e.Insert(comment); err != nil {
|
||||
return nil, err
|
||||
|
@ -879,7 +878,6 @@ type CreateCommentOptions struct {
|
|||
RefAction references.XRefAction
|
||||
RefIsPull bool
|
||||
IsForcePush bool
|
||||
Invalidated bool
|
||||
}
|
||||
|
||||
// CreateComment creates comment of issue or commit.
|
||||
|
@ -955,8 +953,6 @@ type FindCommentsOptions struct {
|
|||
ReviewID int64
|
||||
Since int64
|
||||
Before int64
|
||||
Line int64
|
||||
TreePath string
|
||||
Type CommentType
|
||||
}
|
||||
|
||||
|
@ -980,12 +976,6 @@ func (opts *FindCommentsOptions) toConds() builder.Cond {
|
|||
if opts.Type != CommentTypeUnknown {
|
||||
cond = cond.And(builder.Eq{"comment.type": opts.Type})
|
||||
}
|
||||
if opts.Line > 0 {
|
||||
cond = cond.And(builder.Eq{"comment.line": opts.Line})
|
||||
}
|
||||
if len(opts.TreePath) > 0 {
|
||||
cond = cond.And(builder.Eq{"comment.tree_path": opts.TreePath})
|
||||
}
|
||||
return cond
|
||||
}
|
||||
|
||||
|
@ -1000,8 +990,6 @@ func findComments(e Engine, opts FindCommentsOptions) ([]*Comment, error) {
|
|||
sess = opts.setSessionPagination(sess)
|
||||
}
|
||||
|
||||
// WARNING: If you change this order you will need to fix createCodeComment
|
||||
|
||||
return comments, sess.
|
||||
Asc("comment.created_unix").
|
||||
Asc("comment.id").
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue