mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-31 21:00:02 +02:00
Provide Default messages for merges (#9393)
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
This commit is contained in:
parent
b983ff4473
commit
0c07f1de5b
7 changed files with 276 additions and 15 deletions
|
@ -125,9 +125,10 @@ func GetReviewByID(id int64) (*Review, error) {
|
|||
|
||||
// FindReviewOptions represent possible filters to find reviews
|
||||
type FindReviewOptions struct {
|
||||
Type ReviewType
|
||||
IssueID int64
|
||||
ReviewerID int64
|
||||
Type ReviewType
|
||||
IssueID int64
|
||||
ReviewerID int64
|
||||
OfficialOnly bool
|
||||
}
|
||||
|
||||
func (opts *FindReviewOptions) toCond() builder.Cond {
|
||||
|
@ -141,6 +142,9 @@ func (opts *FindReviewOptions) toCond() builder.Cond {
|
|||
if opts.Type != ReviewTypeUnknown {
|
||||
cond = cond.And(builder.Eq{"type": opts.Type})
|
||||
}
|
||||
if opts.OfficialOnly {
|
||||
cond = cond.And(builder.Eq{"official": true})
|
||||
}
|
||||
return cond
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue