Skip to content

The agent that grows with you

fix: release.py still generates fmt with no_changelog

ethernetecefb138e507
diff --git a/scripts/release.py b/scripts/release.py
index b962e48c07a..055ff9527e3 100755
--- a/scripts/release.py
+++ b/scripts/release.py
@@ -2555,7 +2555,7 @@ def get_pr_number(subject: str) -> str | None:
def generate_changelog(commits, tag_name, semver, repo_url="https://github.com/NousResearch/hermes-agent",
- prev_tag=None, first_release=False):
+ prev_tag=None, first_release=False, no_changelog=False):
"""Generate markdown changelog from categorized commits."""
lines = []
@@ -2582,58 +2582,59 @@ def generate_changelog(commits, tag_name, semver, repo_url="https://github.com/N
lines.append("> for Hermes Agent. See below for everything included in this initial release.")
lines.append("")
- # Group commits by category
- categories = defaultdict(list)
- all_authors = set()
- teknium_aliases = {"@teknium1"}
-
- for commit in commits:
- categories[commit["category"]].append(commit)
- author = commit["github_author"]
- if author not in teknium_aliases:
- all_authors.add(author)
- for coauthor in commit.get("coauthors", []):
- if coauthor not in teknium_aliases:
- all_authors.add(coauthor)
-
- # Category display order and emoji
- category_order = [
- ("breaking", "⚠️ Breaking Changes"),
- ("features", "✨ Features"),
- ("improvements", "🔧 Improvements"),
- ("fixes", "🐛 Bug Fixes"),
- ("docs", "📚 Documentation"),
- ("tests", "🧪 Tests"),
- ("chore", "🏗️ Infrastructure"),
- ("other", "📦 Other Changes"),
- ]
+ if not no_changelog:
+ # Group commits by category
+ categories = defaultdict(list)
+ all_authors = set()
+ teknium_aliases = {"@teknium1"}
- for cat_key, cat_title in category_order:
- cat_commits = categories.get(cat_key, [])
- if not cat_commits:
- continue
+ for commit in commits:
+ categories[commit["category"]].append(commit)
+ author = commit["github_author"]
+ if author not in teknium_aliases:
+ all_authors.add(author)
+ for coauthor in commit.get("coauthors", []):
+ if coauthor not in teknium_aliases:
+ all_authors.add(coauthor)
+
+ # Category display order and emoji
+ category_order = [
+ ("breaking", "⚠️ Breaking Changes"),
+ ("features", "✨ Features"),
+ ("improvements", "🔧 Improvements"),
+ ("fixes", "🐛 Bug Fixes"),
+ ("docs", "📚 Documentation"),
+ ("tests", "🧪 Tests"),
+ ("chore", "🏗️ Infrastructure"),
+ ("other", "📦 Other Changes"),
+ ]
- lines.append(f"## {cat_title}")
- lines.append("")
+ for cat_key, cat_title in category_order:
+ cat_commits = categories.get(cat_key, [])
+ if not cat_commits:
+ continue
- for commit in cat_commits:
- subject = clean_subject(commit["subject"])
- pr_num = get_pr_number(commit["subject"])
- author = commit["github_author"]
+ lines.append(f"## {cat_title}")
+ lines.append("")
- # Build the line
- parts = [f"- {subject}"]
- if pr_num:
- parts.append(f"([#{pr_num}]({repo_url}/pull/{pr_num}))")
- else:
- parts.append(f"([`{commit['short_sha']}`]({repo_url}/commit/{commit['sha']}))")
+ for commit in cat_commits:
+ subject = clean_subject(commit["subject"])
+ pr_num = get_pr_number(commit["subject"])
+ author = commit["github_author"]
- if author not in teknium_aliases:
- parts.append(f"— {author}")
+ # Build the line
+ parts = [f"- {subject}"]
+ if pr_num:
+ parts.append(f"([#{pr_num}]({repo_url}/pull/{pr_num}))")
+ else:
+ parts.append(f"([`{commit['short_sha']}`]({repo_url}/commit/{commit['sha']}))")
- lines.append(" ".join(parts))
+ if author not in teknium_aliases:
+ parts.append(f"— {author}")
- lines.append("")
+ lines.append(" ".join(parts))
+
+ lines.append("")
# Contributors section
if all_authors:
@@ -2771,8 +2772,8 @@ def cmd_canary(args) -> None:
version = tag_name.lstrip("v")
print(f"Canary: {tag_name} ({len(commits)} commits since {since})")
- changelog = "Bug fixes, features, and performance improvements." if args.no_changelog else generate_changelog(
- commits, tag_name, version, prev_tag=since, first_release=False
+ changelog = generate_changelog(
+ commits, tag_name, version, prev_tag=since, first_release=False, no_changelog=args.no_changelog
)
if not args.publish: