Skip to content

ci: add dev-close-notice workflow (trial)#13633

Open
ilhan007 wants to merge 3 commits into
mainfrom
ci/dev-close-notice
Open

ci: add dev-close-notice workflow (trial)#13633
ilhan007 wants to merge 3 commits into
mainfrom
ci/dev-close-notice

Conversation

@ilhan007
Copy link
Copy Markdown
Collaborator

@ilhan007 ilhan007 commented Jun 3, 2026

Adds .github/workflows/dev-close-notice.yaml — comments on PRs targeting main during the week before a release reminding contributors not to merge until the release ships.

Detection

CEM diff. On pull_request events that touched packages/*/src/**:

  1. Build custom-elements-internal.json on PR base + PR head (yarn install + yarn generate).
  2. Diff the two manifests, filtered to public entries (_ui5privacy === 'public' / privacy === 'public').
  3. If anything changed, post the dev-close comment with the changes listed inline.

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.mjs and format-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 targeting main. Manual workflow_dispatch for testing. Idempotent via <!-- dev-close-notice --> marker.

Trial config

const DEV_CLOSE_PERIODS = [
  { release: "next", devCloseStart: "2026-06-29", releaseDate: "2026-07-06" },
];

If it works, we extend the schedule (and likely move dates to a JSON file).

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.
@ilhan007 ilhan007 force-pushed the ci/dev-close-notice branch from 053d6b0 to d9b51c0 Compare June 3, 2026 14:41
ilhan007 added 2 commits June 3, 2026 17:51
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant