From 1d9055f1e81b8a16562c6f352ebcc994713d88d0 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 25 Nov 2023 20:01:18 +0100 Subject: [PATCH 1/2] feat(prerelease): append changes on commit message Grab the changes that are to be written on the changelog file and write them as part of the commit message. This allows to integrate with GitHub release tooling to automatically grab what's part of a release from the commit message of said release. This way, while still releasing with `zest.releser` one can nicely integrate with GitHub releases (and probably GitLab releases as well). --- zest/releaser/baserelease.py | 1 + zest/releaser/prerelease.py | 1 + 2 files changed, 2 insertions(+) diff --git a/zest/releaser/baserelease.py b/zest/releaser/baserelease.py index 458e3ca0..6ba255d1 100644 --- a/zest/releaser/baserelease.py +++ b/zest/releaser/baserelease.py @@ -35,6 +35,7 @@ ), "history_last_release": ("Full text of all history entries of the current release"), "history_lines": "List with all history file lines (when found)", + "history_this_release": "The changes from the release being made", "name": "Name of the project being released", "new_version": "New version to write, possibly with development marker", "nothing_changed_yet": ( diff --git a/zest/releaser/prerelease.py b/zest/releaser/prerelease.py index cdb89d48..45223fa8 100644 --- a/zest/releaser/prerelease.py +++ b/zest/releaser/prerelease.py @@ -90,6 +90,7 @@ def execute(self): self._write_version() if self.data["update_history"]: self._write_history() + self.data["commit_msg"] += self.data["history_this_release"] self._diff_and_commit() def _grab_version(self, initial=False): From be871c6102f21426d83183fad7d9fb36108d2160 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 25 Nov 2023 20:04:37 +0100 Subject: [PATCH 2/2] Update CHANGES --- CHANGES.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7fb51323..6d736679 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,8 +4,9 @@ Changelog for zest.releaser 9.1.2 (unreleased) ------------------ -- Nothing changed yet. - +- Append the changes written in the change log file to the commit message. + This allows integration with GitHub releases. + Fixes issue #218 [gforcada] 9.1.1 (2023-10-11) ------------------