Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* `new-component` command was moved to the `component` command group ([#122])
* Jsonnet library file extension to `.libsonnet` in component template ([#137])

### Fixed

* Commit messages from automated catalog updates do no longer contain a leading newline ([#136])

## [v0.1.6]

### Changed
Expand Down Expand Up @@ -106,4 +110,5 @@ Initial implementation
[#130]: https://github.com/projectsyn/commodore/pull/130
[#133]: https://github.com/projectsyn/commodore/pull/133
[#134]: https://github.com/projectsyn/commodore/pull/134
[#136]: https://github.com/projectsyn/commodore/issues/136
[#137]: https://github.com/projectsyn/commodore/pull/137
3 changes: 1 addition & 2 deletions commodore/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ def _render_catalog_commit_msg(cfg):
config_commits = [_pretty_print_config_commit(c, r) for c, r in cfg.get_configs().items()]
config_commits = '\n'.join(config_commits)

return f"""
Automated catalog update from Commodore
return f"""Automated catalog update from Commodore

Component commits:
{component_commits}
Expand Down
14 changes: 14 additions & 0 deletions tests/test_catalog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Tests for catalog internals
"""

from commodore.catalog import _render_catalog_commit_msg
from commodore.config import Config


def test_catalog_commit_message():
config = Config("https://syn.example.com", "token", "ssh://git@git.example.com", False)

commit_message = _render_catalog_commit_msg(config)
assert not commit_message.startswith('\n')
assert commit_message.startswith('Automated catalog update from Commodore\n\n')