Skip to content

Enforce test exemptions via missing-tests and test-exempt labels - #5164

Open
eyebrowsoffire wants to merge 3 commits into
flutter:mainfrom
eyebrowsoffire:test-exemptions
Open

eyebrowsoffire wants to merge 3 commits into
flutter:mainfrom
eyebrowsoffire:test-exemptions

Conversation

@eyebrowsoffire

Copy link
Copy Markdown
Contributor
  • Apply and update the missing-tests label on PR open, synchronize, and ready_for_review events in app_dart.
  • Fix fusion file filtering and comment-only needsTests evaluation in checkForTests.
  • Update the missing-tests bot comment to direct reviewers to area tech leads for test exemptions.
  • Block autosubmit on PRs with the missing-tests label unless test-exempt or emergency is also applied.

Fixes flutter/flutter#193961

- Apply and update the missing-tests label on PR open, synchronize, and ready_for_review events in app_dart.
- Fix fusion file filtering and comment-only needsTests evaluation in checkForTests.
- Update the missing-tests bot comment to direct reviewers to area tech leads for test exemptions.
- Block autosubmit on PRs with the missing-tests label unless test-exempt or emergency is also applied.

Fixes flutter/flutter#193961
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces automated labeling and validation for pull requests missing tests. It adds the missing-tests and test-exempt labels, updates the webhook subscription to handle ready_for_review events, and implements logic in PullRequestManager to apply or remove the missing-tests label and post comments accordingly. Additionally, it introduces a TestExemption validation in auto_submit to block merging of PRs labeled missing-tests unless they are also labeled test-exempt or emergency. A review comment points out a potential runtime exception in PullRequestManager where pr.draft is force-unwrapped with !, suggesting a safer null-aware check instead.

Comment thread app_dart/lib/src/service/pull_request_manager.dart Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Comment thread app_dart/lib/src/service/config.dart Outdated
Comment thread app_dart/lib/src/service/pull_request_manager.dart Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[cocoon] Add support for new test exemption granting process

2 participants