mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 18:56:11 +01:00
e81ccc406b
Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
26 lines
569 B
Go
26 lines
569 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_12 //nolint
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddReviewCommitAndStale(x *xorm.Engine) error {
|
|
type Review struct {
|
|
CommitID string `xorm:"VARCHAR(40)"`
|
|
Stale bool `xorm:"NOT NULL DEFAULT false"`
|
|
}
|
|
|
|
type ProtectedBranch struct {
|
|
DismissStaleApprovals bool `xorm:"NOT NULL DEFAULT false"`
|
|
}
|
|
|
|
// Old reviews will have commit ID set to "" and not stale
|
|
if err := x.Sync2(new(Review)); err != nil {
|
|
return err
|
|
}
|
|
return x.Sync2(new(ProtectedBranch))
|
|
}
|