ci: add dev-close-notice workflow (trial)#13633
Open
ilhan007 wants to merge 3 commits into
Open
Conversation
Posts a comment on open PRs targeting `main` during the dev-close period (week before a release) to remind contributors that the PR should not be merged until the release ships. Trigger: pull_request events + daily schedule (07:17 UTC) + manual. Trial run: only the next dev-close window is configured inline: 2026-06-29 (dev close start) → 2026-07-06 (release date) If this works as expected we'll extend the schedule (and likely move it to a JSON file for easier editing). The workflow is idempotent — it skips PRs that already have the marker comment, so re-runs won't spam.
053d6b0 to
d9b51c0
Compare
The previous version flagged PRs purely from their Conventional Commit
title (`feat:` / `feat(...)` / any type with `!`). That misses the
common case in this repo: an additive public-API change committed under
a `fix:` or `refactor:` title.
Now the workflow has two layers:
1. **CEM diff (preferred).** On pull_request events that touched
`packages/*/src/**`, build `custom-elements-internal.json` on PR
base AND PR head and diff for public-API additions, removals and type
changes. Diff logic lives in:
- `.github/scripts/dev-close/diff-cem.mjs`
Walks both manifests, filters by `_ui5privacy === 'public'` (or
`privacy === 'public'`), emits a structured JSON diff.
- `.github/scripts/dev-close/format-diff.mjs`
Turns the JSON diff into a Markdown bullet list for the comment.
We diff the *internal* manifest (not the post-processed public one)
so we control the privacy filter ourselves rather than depending on
the build's `processPublicAPI` stripper.
2. **Title regex (fallback).** When CEM diff couldn't run — daily sweep,
no src changes, or the build failed — the workflow falls back to the
title regex from the previous version.
Soft-fails throughout: a failed install/generate on either side just
means the diff step reports `status=failed` and the notify job falls
back to the title regex. The workflow itself never fails.
Behavior matrix:
pull_request + src changed + cem ok → CEM diff (lists changes)
pull_request + src changed + cem 'no-changes' → no comment
pull_request + src changed + cem failed → title regex
pull_request + no src changes → title regex
schedule / workflow_dispatch → title regex
Per review: a single detection path (CEM diff) is clearer than two layers.
The title regex fallback is removed — if CEM can't run (no src changes
or build fails), the workflow exits without commenting.
Also drops the daily schedule trigger: that path was title-only because
building CEM for every open PR every day is too expensive, and removing
the title regex makes the schedule pointless.
Diff script (diff-cem.mjs) gains coverage borrowed from
nnaydenow/version-compare's per-category logic, kept inside our flat-Map
technique:
- properties (kind=field) and methods (kind=method) tracked separately
- events: bubbles, cancelable, parameter add/remove/type changes
- enums: enum-member adds/removals
- interfaces: add/remove/deprecation transitions
- cssStates (in addition to cssParts/cssProperties)
- deprecation transitions on any tracked entity (newly deprecated,
un-deprecated, or message changed)
Triggers: pull_request only (opened/reopened/ready_for_review/sync).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.github/workflows/dev-close-notice.yaml— comments on PRs targetingmainduring the week before a release reminding contributors not to merge until the release ships.Detection
CEM diff. On
pull_requestevents that touchedpackages/*/src/**:custom-elements-internal.jsonon PR base + PR head (yarn install+yarn generate)._ui5privacy === 'public'/privacy === 'public').We diff the internal manifest (not the post-processed
custom-elements.json) so we control the privacy filter ourselves.Diff logic in
.github/scripts/dev-close/diff-cem.mjsandformat-diff.mjs. Coverage: custom-element add/remove, properties (kind=field), methods (kind=method), events incl. bubbles/cancelable/parameters, slots, cssProperties/cssParts/cssStates, attributes, enums + enum-member changes, interfaces, deprecation transitions.Soft-fails throughout — workflow never blocks CI.
Triggers
pull_request(opened / reopened / ready_for_review / synchronize) on PRs targetingmain. Manualworkflow_dispatchfor testing. Idempotent via<!-- dev-close-notice -->marker.Trial config
If it works, we extend the schedule (and likely move dates to a JSON file).