fix(release): filter release notes and version bumps to skill directory#139
Conversation
Each skill was including all repo commits in its CHANGELOG and GitHub release body, and unrelated breaking changes were triggering spurious major bumps. Fix by path-filtering at both the commit-analysis and note-generation stages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the per-skill semantic-release setup so version bump decisions and generated release notes/CHANGELOG entries only consider commits that touched the current skill directory, avoiding unrelated skills affecting release output.
Changes:
- Added a custom commit-analyzer wrapper that filters
context.commitsto only commits affecting the current skill directory before delegating to@semantic-release/commit-analyzer. - Updated semantic-release config to use the wrapper and to scope release note generation via
gitRawCommitsOpts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/path-filtered-analyzer.cjs | New wrapper plugin that computes relevant commit hashes for the current skill directory and filters semantic-release’s commit context accordingly. |
| release.config.cjs | Switches commit analyzer to the path-filtered wrapper and scopes release-notes generation to the skill directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const out = execSync(`git log ${range} --format=%H -- .`, { | ||
| cwd: process.cwd(), | ||
| encoding: "utf8", | ||
| }); |
There was a problem hiding this comment.
Fixed — switched to execFileSync with an argument array so the git range and path are passed as separate argv elements with no shell interpolation.
| commits: commits.filter((c) => relevant.has(c.hash)), | ||
| }; | ||
| return analyzeCommits(pluginConfig, filteredContext); | ||
| } catch { |
There was a problem hiding this comment.
Fixed — the catch now captures the error and logs a warning via context.logger so any fallback is visible in the release output.
- Use execFileSync with argument array instead of execSync with interpolated string to avoid shell injection risk - Log a warning via context.logger when the git fallback is triggered so failures are diagnosable rather than silently swallowed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…doff CHANGELOG (#144) 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).
All existing CHANGELOG.md files contained commits from the entire repo since the skill's last tag, making release notes meaningless. This regenerates each one from scratch using git log filtered to the skill's own directory, following up on adobe#139 which fixed the root cause for future releases. Empty release sections (e.g. 1.0.0) indicate versions bumped solely by docs/refactor commits, which is correct — the angular preset omits those types from the CHANGELOG body. Also adds scripts/regenerate-changelogs.cjs in case a manual re-run is ever needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🎉 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
stardust,migration,aem-workflowwould appear inscrape-webpage's release notesfeat!breaking changes were also triggering spurious major version bumps in unaffected skillsChanges
release.config.cjs@semantic-release/commit-analyzerwith a local wrapper that pre-filterscontext.commitsto hashes touching the skill's directory before delegating to the real analyzergitRawCommitsOpts: { path: "." }to@semantic-release/release-notes-generatorsogit logis scoped to the skill directory when building the changelogscripts/path-filtered-analyzer.cjs@semantic-release/commit-analyzergit log <from>..HEAD --format=%H -- .fromprocess.cwd()(the skill dir) to get relevant commit hashes, filters the context, then delegates with the samereleaseRulesconfigTest plan
feat!in one skill does not trigger a major bump in an unrelated skill🤖 Generated with Claude Code