fix(release): path-filter release-notes-generator + restore slicc-handoff CHANGELOG#144
Conversation
…doff CHANGELOG PR #139 wrapped commit-analyzer with path filtering but tried to fix release-notes-generator with gitRawCommitsOpts: { path: '.' } -- a no-op because the plugin reads context.commits from semantic-release, never gitRawCommitsOpts. Result: every skill release body and CHANGELOG included commits from the entire repo (see slicc-handoff-v1.0.0). - Add scripts/path-filtered-notes-generator.cjs mirroring the analyzer wrapper -- filters context.commits via git log -- . before delegating to the real plugin. - Wire it into release.config.cjs in place of the bare plugin entry; drop the dead gitRawCommitsOpts config. - Regenerate plugins/aem/edge-delivery-services/skills/slicc-handoff/ CHANGELOG.md (skipped by PR #140 because the tag did not exist yet).
Tessl Skill Lint
|
There was a problem hiding this comment.
Pull request overview
Fixes per-skill release note generation so GitHub release bodies and skill CHANGELOG.md entries only include commits that touched the skill directory, addressing the remaining unscoped release-notes behavior from the earlier path-filtered analyzer change.
Changes:
- Add a local wrapper for
@semantic-release/release-notes-generatorthat filterscontext.commitsbygit log -- .from the skill directory before generating notes. - Wire the wrapper into
release.config.cjsand remove the ineffectivegitRawCommitsOptsconfiguration. - Regenerate
slicc-handoff’sCHANGELOG.mdto remove unrelated repo commits from the v1.0.0 entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/path-filtered-notes-generator.cjs | New wrapper plugin that path-filters commits before delegating to release-notes-generator. |
| release.config.cjs | Switch release-notes generation to the new wrapper and drop no-op config. |
| plugins/aem/edge-delivery-services/skills/slicc-handoff/CHANGELOG.md | Replace unfiltered v1.0.0 notes with the correct skill-scoped entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The semantic-release/github success step posts a 'released in version' comment on the merged PR. With only contents+issues write, GitHub denied that write (see run 26256538929: 'Not allowed to add a comment to the issue/PR #144'). Per @semantic-release/github docs, pull-requests: write is required for the success comment.
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 2.0.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Summary
Follow-up to #139 and #140. The most recent release (slicc-handoff-v1.0.0) showed the same problem we thought we fixed: its body and CHANGELOG listed every commit in the repo (stardust, migration, aem-workflow, etc.).
Root cause
PR #139 wrapped
@semantic-release/commit-analyzerwithscripts/path-filtered-analyzer.cjsso the version-bump decision is path-scoped. It also addedgitRawCommitsOpts: { path: "." }to@semantic-release/release-notes-generator, but that option is a no-op: looking at the plugin source (release-notes-generator/index.js),generateNotesreadscontext.commitsstraight from semantic-release’s pipeline and never touchesgitRawCommitsOpts. SoanalyzeCommitswas correctly scoped, butgenerateNoteskept seeing the full repo history.And PR #140’s
regenerate-changelogs.cjsskippedslicc-handoff(if (!tags.length) continue;) because at that point it had no tag yet — the very next release then wrote the buggy unfiltered changelog toslicc-handoff/CHANGELOG.md.Changes
scripts/path-filtered-notes-generator.cjs(new)@semantic-release/release-notes-generator, mirroringpath-filtered-analyzer.cjs.git log <from>..HEAD --format=%H -- .fromprocess.cwd()(the skill dir) to get relevant commit hashes, filterscontext.commits, then delegates to the real plugin.lastRelease.gitHead), the range is omitted so the filter runs against full history.logger.warnif git fails (same pattern as the analyzer).release.config.cjs@semantic-release/release-notes-generatorplugin entry with the new wrapper (referenced by absolute path, same way the analyzer is wired).gitRawCommitsOpts: { path: "." }config.plugins/aem/edge-delivery-services/skills/slicc-handoff/CHANGELOG.mdscripts/regenerate-changelogs.cjsnow that the tag exists. The file is now a short Features section with the singleadd slicc-handoff skillcommit.slicc-handoff-v1.0.0was also patched to match (release id 327188608, no re-publish,created_at/published_atpreserved).Test plan
node -e "require('./scripts/path-filtered-notes-generator.cjs')"loads cleanly.node -e "const c = require('./release.config.cjs'); ..."shows the new wrapper in the plugin list and no bare@semantic-release/release-notes-generatorentry.plugins/aem/edge-delivery-services/skills/slicc-handoff/CHANGELOG.mdreferences only theslicc-handoffcommit.slicc-handoff-v1.0.0now matches the corrected CHANGELOG entry.Why not roll forward instead
The broken release artifacts (
slicc-handoff-v1.0.0body + checked-in CHANGELOG) needed manual cleanup either way — semantic-release will not rewrite a published release, and the unfiltered CHANGELOG was already committed tomain. This PR fixes the config so the next release is correct and cleans up the one bad artifact in place.Pull Request opened by Augment Code with guidance from the PR author