Skip to content

Commit

Permalink
Merge pull request #431 from bbhtt/bbhtt/fix-subj-single-module
Browse files Browse the repository at this point in the history
main: Report the module name when only one module changed
  • Loading branch information
wjt committed Jun 12, 2024
2 parents 9934810 + 5e28d97 commit 7a0b81e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def commit_message(changes: t.List[str]) -> str:
return changes[0]

module_names = list(dict.fromkeys(list(i.split(":", 1)[0] for i in changes)))

if len(module_names) == 1:
return f"Update {module_names[0]} module"

for i in reversed(range(2, len(module_names) + 1)):
xs = module_names[: i - 1]
y = module_names[i - 1]
Expand Down

0 comments on commit 7a0b81e

Please sign in to comment.