Skip to content

Approvals are dismissed when new commits are pushed #27114

Closed
@jpraet

Description

@jpraet

Description

With #25882, if

image

is set on the branch protection, approvals get dismissed when new commits are added.

I am not sure if it was the actual intent of this branch protection to actively "Dismiss" the review.

Previously, this option already caused stale approvals to be ignored towards the PR approval count, which seems sufficient?

gitea/models/issues/pull.go

Lines 837 to 839 in a50d9af

if protectBranch.DismissStaleApprovals {
sess = sess.And("stale = ?", false)
}

Now, the review is actually dismissed, resulting in an entry in the PR history, and an (empty) email notification.

This dismissed review is also not shown in the "Reviewers" view of the PR, whereas stale reviews are.

In my opinion actually dismissing the review because new commits are added is a bit excessive?

Gitea Version

1.20.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions