bazelbuild / rules_pkg

Bazel rules for creating packages of many types (zip, tar, deb, rpm, ...)
Apache License 2.0
221 stars 174 forks source link

Add a CHANGELOG/release notes generator #228

Open aiuto opened 4 years ago

aiuto commented 4 years ago

Looking through github logs is tedious. We could have a tool which would read the logs back to a particular point (usually last major or minor release) and use that to:

Extract RELNOTES sections from them and print them. If they fix issues, find those issues and add them to an "Issues Fixed" section Extract authors and use that to build a thank-you section.

The bazel release tool does something similar, but it is in bash, which limits portability.

nacl commented 4 years ago

Was this resolved by #234?

aiuto commented 4 years ago

No. I have tools that update CHANGELOG from commit comments, but the tools are not ready to check in. They need tests and portability beyond linux.Since they call git to get the comments, I need to build a git-toolchain to autodetect git on each platform. Then, how do I unit test the comment extraction tools? I hacked the features together in a couple of hours. Making it production ready will take about 10 more. It feels like classic yak-shaving.

statik commented 4 years ago

I don't know if it does everything you are looking for, but I've been getting good mileage out of https://github.com/marketplace/actions/release-drafter on various projects to gather up release notes as merges happen.

achew22 commented 4 years ago

To toss another one out, chyle is written in go and doesn't have any dependencies on system git which might make multi-os compatibility easier.

Alternatively, you could try using go-git (a pure go implementation of git's storage/transport protocol) directly and probably get something without too much fuss.

aiuto commented 4 years ago

I would rather not use Go, because then one has to bring in the Go compiler for any platform just to test this tangential feature of the library. I've been writing in Python. What might work is a pure python git module that can be imported with an http_archive.

A side concern is that I would someday like to switch Bazel to use these tools rather than the shell scripts we have to gather logs. There will be objections to bringing in new repositories to third_party. Without arguing that the objections are valid or not, the fewer dependencies on other repos I take the better.