Skip to content

Label pull requests that add partial implementations - #30385

Draft
caugner wants to merge 3 commits into
mainfrom
30261-label-partial-implementation-prs
Draft

Label pull requests that add partial implementations#30385
caugner wants to merge 3 commits into
mainfrom
30261-label-partial-implementation-prs

Conversation

@caugner

@caugner caugner commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a "sets partial" label to pull requests that add a partial_implementation flag, and remove it again when they no longer do.

  • npm run diff:partials -- [base] [head] prints the <feature>.<browser> paths that gain (+) or lose (-) a partial implementation between two references, or for a pull request number. --json prints the same as JSON.
  • A new Partial Implementation Labeler workflow runs it per pull request and synchronizes the label. It can also be dispatched manually to (re-)label all open pull requests.
  • The ref resolution of diff:flat (remote lookup, pull request number shorthand) moved to scripts/lib/git.js for reuse, without behavior change.

The label needs to be created in the repository before this is merged, and does not exist yet.

Test results and supporting details

diff:partials compares the set of paths carrying partial_implementation, rather than grepping the diff for added partial_implementation lines. Of the last 300 commits on main, 17 add such a line, but 4 of those should not be labeled, and the structural comparison gets all 4 right:

Pull request +/- partial lines in diff diff:partials Reality
#30290 1 / 1 no change existing partial implementation modified
#30246 1 / 1 no change existing partial implementation modified
#30170 1 / 1 no change existing partial implementation modified
#29986 319 / 326 +1 / -8 mostly reformatting, net removal
#30255 1 / 0 + api.PublicKeyCredential.isConditionalMediationAvailable_static.webview_android added
#30212 1 / 0 + css.properties.mask-image.svg_masks.safari added
#30221 2 / 0 + css.properties.text-box{,-trim}.inline_elements.safari added

Unresolved "mirror" values are ignored, so a partial implementation is only reported for the browser whose data states it.

The labeling logic was run locally (with the API calls stubbed out) against #30320 (adds a partial implementation, gets labeled), #30384 and #30353 (no change), and against a pull request with merge conflicts, where the missing pull/N/merge ref results in a warning and a skip, rather than a failure. Since pull_request_target workflows run from the base branch, the workflow itself cannot run on this pull request; after merging, a manual dispatch labels the open pull requests.

Unit tests cover the collection and comparison of partial implementations.

Related issues

Fixes #30261.

Move the remote lookup, `fetchAndResolve()` and the pull request number
shorthand out of `diff-flat.js`, so that other scripts can resolve the
same base and head references.
Compare the set of `<feature>.<browser>` paths that carry
`partial_implementation` between two references, and print the added and
removed ones.

Unlike grepping the diff for added `partial_implementation` lines, this
ignores reformatting and reports nothing when an existing partial
implementation is only modified.
Add and remove the "sets partial" label based on `diff:partials`, so that
open pull requests adding a partial implementation can be linked on the
agenda of the weekly BCD call.

The workflow can also be dispatched manually to label all open pull
requests, e.g. to backfill the label.
@github-actions github-actions Bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project docs Issues or pull requests regarding the documentation of this project. scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

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

Labels

docs Issues or pull requests regarding the documentation of this project. infra Infrastructure issues (npm, GitHub Actions, releases) of this project scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Label partial_implementation data PRs

1 participant