Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dismissed state #866

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Add dismissed state #866

merged 2 commits into from
Oct 24, 2024

Conversation

alankpatel
Copy link
Contributor

Previously we skipping the check if the state was dismissed but after adding dismissed as one of the base states it will rerun the policy if we receive that event.

@alankpatel alankpatel requested a review from bluekeyes October 23, 2024 22:41
@@ -88,6 +88,9 @@ 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{})
// Include dismissed state
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to comment here, let's explain why we need to include the dismissed state, maybe something like:

Always process events for dismissed reviews because they can revert the overall approval or disapproval to a previous state

@bulldozer-bot bulldozer-bot bot merged commit fc09d7a into develop Oct 24, 2024
8 checks passed
@bulldozer-bot bulldozer-bot bot deleted the dismissed-state-affect-approval branch October 24, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants