Skip to content

Commit

Permalink
Add dismissed state (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
alankpatel authored Oct 24, 2024
1 parent 758ecc9 commit fc09d7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/handler/pull_request_review.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func (h *PullRequestReview) Handle(ctx context.Context, eventType, deliveryID st

func (h *PullRequestReview) affectsApproval(reviewState pull.ReviewState, config *policy.Config) bool {
states := make(map[pull.ReviewState]struct{})

// Always process events for dismissed reviews because they can revert the overall approval or disapproval to a previous state
states[pull.ReviewDismissed] = struct{}{}

for _, rule := range config.ApprovalRules {
states[rule.Options.GetMethods().GithubReviewState] = struct{}{}
}
Expand Down

0 comments on commit fc09d7a

Please sign in to comment.