Skip to content

Commit 20649af

Browse files
committed
scripts: add line with count of excluded commits in build_changelog.sh
1 parent 038d48a commit 20649af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/build_changelog.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def summary_repo(
207207
feats = ""
208208
fixes = ""
209209
misc = ""
210+
hidden = 0
210211

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

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

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

0 commit comments

Comments
 (0)