mirror of https://github.com/go-gitea/gitea.git
Browse Source
Fixes #27114. * In Gitea 1.12 (#9532), a "dismiss stale approvals" branch protection setting was introduced, for ignoring stale reviews when verifying the approval count of a pull request. * In Gitea 1.14 (#12674), the "dismiss review" feature was added. * This caused confusion with users (#25858), as "dismiss" now means 2 different things. * In Gitea 1.20 (#25882), the behavior of the "dismiss stale approvals" branch protection was modified to actually dismiss the stale review. For some users this new behavior of dismissing the stale reviews is not desirable. So this PR reintroduces the old behavior as a new "ignore stale approvals" branch protection setting. --------- Co-authored-by: delvh <dev.lh@web.de>pull/28585/merge
12 changed files with 53 additions and 2 deletions
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v1_22 //nolint
|
||||
import ( |
||||
"xorm.io/xorm" |
||||
) |
||||
|
||||
func AddIgnoreStaleApprovalsColumnToProtectedBranchTable(x *xorm.Engine) error { |
||||
type ProtectedBranch struct { |
||||
IgnoreStaleApprovals bool `xorm:"NOT NULL DEFAULT false"` |
||||
} |
||||
return x.Sync(new(ProtectedBranch)) |
||||
} |
||||
Loading…
Reference in new issue