Skip to content

Commit

Permalink
scripts: add line with count of excluded commits in build_changelog.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 6, 2023
1 parent 038d48a commit 20649af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def summary_repo(
feats = ""
fixes = ""
misc = ""
hidden = 0

# pretty format is modified version of: https://stackoverflow.com/a/1441062/965332
summary_bundle = run(
Expand All @@ -229,6 +230,8 @@ def summary_repo(
fixes += entry
elif commit.type not in filter_types:
misc += entry
else:
hidden += 1

for name, entries in (("✨ Features", feats), ("🐛 Fixes", fixes), ("🔨 Misc", misc)):
if entries:
Expand All @@ -239,6 +242,9 @@ def summary_repo(
else:
out += f"\n\n### {title}\n"
out += entries
if hidden > 1:
full_history_url = f"https://github.com/{org}/{repo}/compare/{commit_range[0]}...{commit_range[1]}"
out += f"\n\n*(excluded {hidden} less relevant [commits]({full_history_url}))*"

# NOTE: For now, these TODOs can be manually fixed for each changelog.
# TODO: Fix issue where subsubmodules can appear twice (like aw-webui)
Expand Down

0 comments on commit 20649af

Please sign in to comment.