Skip to content

Use latest review state for maintainer approval#5725

Draft
50sotero wants to merge 1 commit into
databricks:mainfrom
50sotero:fix/issue-5322-latest-review-approval
Draft

Use latest review state for maintainer approval#5725
50sotero wants to merge 1 commit into
databricks:mainfrom
50sotero:fix/issue-5322-latest-review-approval

Conversation

@50sotero

Copy link
Copy Markdown

Summary

  • collapse PR reviews to the latest review state per reviewer
  • use that latest-state view for maintainer, maintainer-authored, and per-path owner approvals
  • add regressions for stale approvals followed by changes requested

Fixes #5322

Tests

  • node --test .github/workflows/maintainer-approval.test.js
The maintainer-approval workflow treated any historical APPROVED review as current, so a later CHANGES_REQUESTED review from the same user did not revoke approval.

The workflow now reduces reviews to the latest state per reviewer before evaluating maintainer, maintainer-authored, and per-path approvals.

Constraint: GitHub returns the full review history, but the approval decision should reflect each reviewer's current state.

Rejected: Filter out CHANGES_REQUESTED reviews only | stale approvals would still count after later comments or dismissals

Confidence: high

Scope-risk: narrow

Tested: node --test .github/workflows/maintainer-approval.test.js

Related: databricks#5322
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 5725
  • Commit SHA: 84dc19b0a8fd03456f2e642431b8c385da306360

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant