diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2024-01-15 08:20:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 07:20:01 +0000 |
commit | 5d3fdd121279c758f247a76e020799aa5e548feb (patch) | |
tree | e27b631cfdfd35d673da1130c9639633a1e3bc10 /routers/web/repo/setting | |
parent | ce0225c1b87d682f53b87496c8dd6ccee0396f0b (diff) | |
download | gitea-5d3fdd121279c758f247a76e020799aa5e548feb.tar.gz gitea-5d3fdd121279c758f247a76e020799aa5e548feb.zip |
Add branch protection setting for ignoring stale approvals (#28498)
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>
Diffstat (limited to 'routers/web/repo/setting')
-rw-r--r-- | routers/web/repo/setting/protected_branch.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routers/web/repo/setting/protected_branch.go b/routers/web/repo/setting/protected_branch.go index 73adfec95a..98d6977b81 100644 --- a/routers/web/repo/setting/protected_branch.go +++ b/routers/web/repo/setting/protected_branch.go @@ -228,6 +228,7 @@ func SettingsProtectedBranchPost(ctx *context.Context) { protectBranch.BlockOnRejectedReviews = f.BlockOnRejectedReviews protectBranch.BlockOnOfficialReviewRequests = f.BlockOnOfficialReviewRequests protectBranch.DismissStaleApprovals = f.DismissStaleApprovals + protectBranch.IgnoreStaleApprovals = f.IgnoreStaleApprovals protectBranch.RequireSignedCommits = f.RequireSignedCommits protectBranch.ProtectedFilePatterns = f.ProtectedFilePatterns protectBranch.UnprotectedFilePatterns = f.UnprotectedFilePatterns |