Open gforcada opened 7 months ago
When I hear towncrier
I cry " @mauritsvanrees " right away. I'm only using manually tweaked changelog entries, Maurits knows more about towncrier I believe.
I tried it manually on a test package that does not use towncrier, with gh release create --notes-from-tag v3.0.0
and got this:
https://github.com/mauritsvanrees/mauritstestpackage/releases/tag/v3.0.0
The release note is "Tagging 3.0.0", which is from the tag, so not from the commit message.
I tried a change in zest.releaser which would work without towncrier as well:
$ git diff
diff --git a/zest/releaser/release.py b/zest/releaser/release.py
index cb60697..474bc6b 100644
--- a/zest/releaser/release.py
+++ b/zest/releaser/release.py
@@ -94,6 +94,8 @@ class Releaser(baserelease.Basereleaser):
)
self.data["tag-signing"] = self.zest_releaser_config.tag_signing()
self.data["tag_already_exists"] = self.vcs.tag_exists(tag)
+ self._grab_history()
+ self.data["tag-message"] = self.data["history_last_release"]
def execute(self):
"""Do the actual releasing"""
With that I released v3.0.4. Ugly, but that could probably be worked around.
@mauritsvanrees so, would you suggest that the key to use should be tag-message
? 👍🏾 I'm happy with any name, as long as we can get this somehow merged 😄
Yes, the tag-message
key would seem to work best.
This would be done by adapting your PR https://github.com/collective/zestreleaser.towncrier/pull/26, which would mean no changes in zest.releaser
itself are needed, if I see it correctly.
Fixes #218
My main use case here is
zest.releaser
used together withzestreleaser.towncrier
.Thus the changes here are almost a noop, as the new key added to
DATA
(history_this_release
) is expected to be filled onzestreleaser.towncrier
.For plain
zest.releaser
use case, we might have to parse the change log file manually to extract that information, right? Or is thehistory_last_release
a good candidate already? 🤔I was not 100% sure, so that's why I'm creating this PR as a draft.
I'm pushing the
zestreleaser.towncrier
changes in a bit, stay tuned 📻