Skip to content

Commit

Permalink
scripts: Allow empty changelog
Browse files Browse the repository at this point in the history
No need to block the script a week when no PR is merged
  • Loading branch information
tonial committed Jan 6, 2025
1 parent c1dc080 commit c2dd7ae
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions scripts/mkchangelog
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,18 @@ def main(publish):
)
log_entries[pr_changelog_labels.pop()].append(title)

# Changelog entries are up to the next Monday (excluded).
new_changelog.write(f"## {sprint_end + datetime.timedelta(days=1)}\n\n")

if any(log_entries.values()):
# Changelog entries are up to the next Monday (excluded).
new_changelog.write(f"## {sprint_end + datetime.timedelta(days=1)}\n\n")

for label, label_title in LABEL_TITLES.items():
if log_entries[label]:
new_changelog.write(f"### {label_title}\n\n")
for title in ci_sort(log_entries[label]):
new_changelog.write(f"- {title}\n")
new_changelog.write("\n")
for label, label_title in LABEL_TITLES.items():
if log_entries[label]:
new_changelog.write(f"### {label_title}\n\n")
for title in ci_sort(log_entries[label]):
new_changelog.write(f"- {title}\n")
new_changelog.write("\n")
else:
new_changelog.write("Rien à signaler cette semaine\n\n")

# Don’t forget the previous header.
new_changelog.write(last_entry_header)
Expand Down

0 comments on commit c2dd7ae

Please sign in to comment.