Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions js/.changeset/fix-release-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@link-assistant/agent': patch
---

Fix GitHub release style to match template repository standards

- Fix release name format to use `[js]` prefix instead of `js ` (e.g., `[js] 0.8.4` instead of `js 0.8.4`)
- Fix changelog path for js releases to use `js/CHANGELOG.md` instead of root `CHANGELOG.md`
- This ensures release descriptions contain actual changelog content with PR links and npm badges

Fixes #121
17 changes: 14 additions & 3 deletions scripts/create-github-release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,20 @@ console.log(`Creating GitHub release for ${tag}...`);

try {
// Read CHANGELOG.md - check prefix for appropriate changelog location
const changelogPath = prefix === 'rust-' ? './rust/CHANGELOG.md' : './CHANGELOG.md';
// js- prefix uses js/CHANGELOG.md, rust- prefix uses rust/CHANGELOG.md, others use root
const changelogPath =
prefix === 'rust-'
? './rust/CHANGELOG.md'
: prefix === 'js-'
? './js/CHANGELOG.md'
: './CHANGELOG.md';
let changelog = '';
try {
changelog = readFileSync(changelogPath, 'utf8');
} catch {
console.log(`No changelog found at ${changelogPath}, using default release notes`);
console.log(
`No changelog found at ${changelogPath}, using default release notes`
);
}

// Extract changelog entry for this version
Expand All @@ -87,7 +95,10 @@ try {
// Create release using GitHub API with JSON input
// This avoids shell escaping issues that occur when passing text via command-line arguments
// (Previously caused apostrophes like "didn't" to appear as "didn'''" in releases)
const releaseName = prefix ? `${prefix.replace(/-$/, '')} ${version}` : version;
// Release name format: "[prefix] version" for prefixed releases (e.g., "[js] 0.8.3"), just version otherwise
const releaseName = prefix
? `[${prefix.replace(/-$/, '')}] ${version}`
: version;
const payload = JSON.stringify({
tag_name: tag,
name: releaseName,
Expand Down