Skip to content

fix(release): filter release notes and version bumps to skill directory#139

Merged
trieloff merged 2 commits into
mainfrom
fix/release-notes-path-filtering
May 20, 2026
Merged

fix(release): filter release notes and version bumps to skill directory#139
trieloff merged 2 commits into
mainfrom
fix/release-notes-path-filtering

Conversation

@trieloff

Copy link
Copy Markdown
Contributor

Summary

  • Each skill's CHANGELOG and GitHub release body was including all commits from the entire repo since its last tag — unrelated skills like stardust, migration, aem-workflow would appear in scrape-webpage's release notes
  • Unrelated feat! breaking changes were also triggering spurious major version bumps in unaffected skills
  • Fix by adding path filtering at both stages: commit analysis (version bump decision) and note generation (CHANGELOG / release body)

Changes

release.config.cjs

  • Replaces @semantic-release/commit-analyzer with a local wrapper that pre-filters context.commits to hashes touching the skill's directory before delegating to the real analyzer
  • Adds gitRawCommitsOpts: { path: "." } to @semantic-release/release-notes-generator so git log is scoped to the skill directory when building the changelog

scripts/path-filtered-analyzer.cjs

  • Thin CJS wrapper around @semantic-release/commit-analyzer
  • Runs git log <from>..HEAD --format=%H -- . from process.cwd() (the skill dir) to get relevant commit hashes, filters the context, then delegates with the same releaseRules config
  • Falls back to unfiltered behavior if the git command fails

Test plan

  • Merge a PR that touches only one skill and confirm its release notes contain only commits for that skill's directory
  • Confirm a feat! in one skill does not trigger a major bump in an unrelated skill
  • Confirm skills with no changes are still skipped by the release workflow

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 20, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.commits to 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.

Comment thread scripts/path-filtered-analyzer.cjs Outdated
Comment on lines +14 to +17
const out = execSync(`git log ${range} --format=%H -- .`, {
cwd: process.cwd(),
encoding: "utf8",
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — switched to execFileSync with an argument array so the git range and path are passed as separate argv elements with no shell interpolation.

Comment thread scripts/path-filtered-analyzer.cjs Outdated
commits: commits.filter((c) => relevant.has(c.hash)),
};
return analyzeCommits(pluginConfig, filteredContext);
} catch {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@trieloff trieloff merged commit dedb959 into main May 20, 2026
9 checks passed
@trieloff trieloff deleted the fix/release-notes-path-filtering branch May 20, 2026 17:58
trieloff added a commit that referenced this pull request May 21, 2026
…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).
Object-ions pushed a commit to Object-ions/adobe-for-creativity-skills that referenced this pull request May 25, 2026
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>
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants