Repository navigation
ci(release): GitLab component notes only list what changed in the component - #578
Conversation
…ponent propagate.yml copied the GitHub release body into the component's RELEASE_NOTES.md, so every GitLab Catalog release carried the whole CLI changelog: GitHub-only controls, dependency bumps, tests. scripts/release-component-notes.sh now builds those notes, in the Keep a Changelog 1.1.0 format: the image the release pins, one entry per commit touching templates/ since the previous tag (release commits skipped), a link to the GitHub release for the full CLI changelog, and a compare link between the component tags. Closes #569 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| security+=("$entry") | ||
| elif printf '%s' "$desc" | grep -qi 'deprecat'; then | ||
| deprecated+=("$entry") | ||
| elif printf '%s' "$desc" | grep -qiE '^(remove|drop)'; then |
There was a problem hiding this comment.
🔴 Bug risks
Low: the Removed-section classifier grep -qiE '^(remove|drop)' matches any subject whose first word merely starts with "remove"/"drop", so additions like "dropdown"/"drop-in" are listed as removals. (Low)
The regex ^(remove|drop) has no word boundary, so it matches any description beginning with those letters, not just the words remove/drop. This check runs before the feat/fix type checks and on every commit regardless of type.
Concrete failure: a template-touching commit feat(component): dropdown selector for report format (or feat(component): drop-in replacement for X) has desc="dropdown selector for report format". ^(remove|drop) matches the leading drop of "dropdown", so the entry is appended to removed+=(...) at line 75 and the GitLab component release notes show the new feature under ### Removed — telling component users a capability was removed when it was actually added.
The header comment documents the intent as "subject starting remove/drop", i.e. the words remove/drop, so this is an implementation gap rather than a documented trade-off. Anchoring to a word boundary fixes it, e.g. ^(remove|drop)(\b|[[:space:]]|$) (or ^(remove|removes|removed|drop|drops|dropped|dropping) ). Note the Deprecated check on line 72 (grep -qi 'deprecat') is explicitly documented as matching anywhere ("subject saying deprecate"), so it is intentional and not part of this finding.
Control: .github/claude-prompts/bug-risks.md · resolve this conversation once addressed.
There was a problem hiding this comment.
🔴 Test coverage
Low: the security-by-type classification branch is never exercised by a test — only the security-by-scope branch is. (Low)
The section classifier in scripts/release-component-notes.sh:70 routes a commit to Security when either its conventional-commit type is security or its scope contains security:
if [ "$type" = "security" ] || [[ ",${scope}," =~ ,[[:space:]]*security[[:space:]]*, ]]; thenThe test suite only covers the scope branch — scripts/release-component-notes.test.sh:230 commits fix(component,security): do not echo the token and asserts it lands under ### Security. There is no test for a security-typed commit (e.g. security: patch the token leak or security(component): rotate keys), even though the script's own header comment documents this mapping ("security type or scope -> Security", scripts/release-component-notes.sh:17).
Because the [ "$type" = "security" ] disjunct is never executed, a regression affecting only that branch — a typo, or a refactor that collapses the condition to scope-only — would silently misclassify security-typed commits into the Changed section, producing incorrect GitLab component release notes, and the full test run would still report all tests passed.
Suggested test: add a commit commit templates/plumber.yml "security: patch the token leak" (plain security type, no scope) before the v0.8.0 release in the section-coverage block, and assert its description appears under ### Security (and does not appear under ### Changed). This closes the second, currently-unverified half of the Security routing logic.
Control: .github/claude-prompts/test-coverage.md · resolve this conversation once addressed.
"dropdown" or "drop-in" subjects were listed as removals. Test the security type route too, and check entries inside their section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What type of PR is this?
ci
What this PR does / why we need it:
propagate.ymlcopied the GitHub release body into the component'sRELEASE_NOTES.md, and the GitLab tag pipeline published it as is. Every GitLab Catalog release therefore listed the whole CLI changelog. For example, v0.7.11 lists the workflow lockfile control and a github-actions bump, while the only change to the component is the image digest.The notes are now built by
scripts/release-component-notes.sh, in the Keep a Changelog 1.1.0 format (following p1-dta's note on the issue):templates/between the previous tag and this one becomes an entry:feat→ Added,fix→ Fixed, deprecate → Deprecated, remove/drop → Removed,securitytype or scope → Security, anything else → Changed. A breaking change gets a**Breaking:**prefix. Empty sections are left out.Which issue(s) this PR is related to:
Fixes #569
Special notes for your reviewer:
(release)scope, which covers today'schore(release)and the olderci(release): pin …commits. Their only template change is the digest bump, already covered by the image entry.GH_TOKENis gone from the "Resolve release refs" step: nothing in it callsghany more.COMPONENT_URL/CLI_URLdefault to getplumber's GitLab and GitHub projects.CLI_URLcomes from the workflow context;COMPONENT_URLis only overridden by the e2e lab below.Does this PR introduce a user-facing change?
How was this tested?
scripts/release-component-notes.test.sh(27 cases, wired intoscripts-test.yml). It covers: first release with no previous tag, version sort (v0.7.9 < v0.7.10), a digest-only release, every section and its order, breaking markers, release and CLI-only commits left out, URL overrides, and bad inputs. The four existing release script tests still pass.propagate.ymlin getplumber-examples/release-propagate-lab, pushing to thibaultcondemine/component-release-lab, with the real templates and digests of v0.7.9 to v0.7.12.release.ymldoes (run, GitLab release).AI usage disclosure:
YES. Written with Claude Code (script, tests, workflow change, e2e lab). The author reviewed the changes and is responsible for them.
🤖 Generated with Claude Code