Skip to content

Commit

Permalink
main: Set module names as title
Browse files Browse the repository at this point in the history
If the length crosses 56 characters then the title breaks off to
multiple lines and becomes too verbose. So revert to the old message
to avoid that.
  • Loading branch information
bbhtt committed Jun 4, 2024
1 parent 7f99008 commit 6abedc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,12 @@ def commit_changes(changes: t.List[str]) -> CommittedChanges:
log.info("Committing updates")
body: t.Optional[str]
if len(changes) > 1:
subject = "Update {} modules".format(len(changes))
module_names = set([i.split(":", 1)[0] for i in changes])
subj_string = "Update: " + ", ".join(module_names)
if len(subj_string) <= 56:
subject = subj_string
else:
subject = "Update {} modules".format(len(changes))
body = "\n".join(changes)
message = subject + "\n\n" + body
else:
Expand Down

0 comments on commit 6abedc8

Please sign in to comment.