Repository navigation
Exempt pending changelog entries from the packages test requirement - #5167
Conversation
Batch release packages in flutter/packages add changelog entries as YAML files under `<package>/pending_changelogs/` instead of editing `CHANGELOG.md`. Like all `.md` files, `CHANGELOG.md` is already exempt from the test requirement, but pending changelog entries weren't. So PRs that wouldn't otherwise need tests, such as README-only or comment-only changes, got the `missing-tests` label and needed a manual test exemption. For example, flutter/packages#13135 only changes a README and adds a pending changelog entry. This skips files under `pending_changelogs/` in the flutter/packages test check, the same way `.ci/` files are already skipped. Fixes flutter/flutter#191744
There was a problem hiding this comment.
Code Review
This pull request exempts pending changelog entries for batch release packages from requiring tests and adds a corresponding test to verify this behavior. Feedback suggests removing the leading slash from the 'pending_changelogs/' check to make it more robust against relative paths.
| !filename.contains('.ci/') && | ||
| // Pending changelog entries for batch release packages. These take | ||
| // the place of CHANGELOG.md updates, which are already exempt. | ||
| !filename.contains('/pending_changelogs/') && |
There was a problem hiding this comment.
Using filename.contains('/pending_changelogs/') requires a leading slash, which might not be present if the path is relative and starts directly with pending_changelogs/ (e.g., in certain test environments or if a package is at the root level). Removing the leading slash to use filename.contains('pending_changelogs/') is more robust and consistent with other path checks in this file (like filename.contains('.ci/')).
| !filename.contains('/pending_changelogs/') && | |
| !filename.contains('pending_changelogs/') && |
Batch release packages in flutter/packages add changelog entries as YAML files under
<package>/pending_changelogs/instead of editingCHANGELOG.md. Like all.mdfiles,CHANGELOG.mdis already exempt from the test requirement, but pending changelog entries weren't. So PRs that wouldn't otherwise need tests, such as README-only or comment-only changes, got themissing-testslabel and needed a manual test exemption. For example, flutter/packages#13135 only changes a README and adds a pending changelog entry.This skips files under
pending_changelogs/in the flutter/packages test check, the same way.ci/files are already skipped.Fixes flutter/flutter#191744
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.