thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
210 stars 54 forks source link

ci: auto generate changelog #2926

Closed reubenmiller closed 2 weeks ago

reubenmiller commented 3 weeks ago

Proposed changes

Auto generate changelog (for the current version only) in the build-workflow when a tag is generated. Changelog generation is provided by git-cliff combining both commit history and Github PR title and labels.

A build task has been added to generate the changelog for the current version:

# set your github token (otherwise you may be rate-limited)
export GITHUB_TOKEN=$(gh auth token)

# generate the _CHANGELOG.md (not commited to the repo)
just generate-changelog

Check out added docs for more details about design decisions.

Types of changes

Paste Link to the issue

https://github.com/thin-edge/thin-edge.io/issues/2715

Checklist

Further comments

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.0%. Comparing base (f186b3f) to head (17dff9c). Report is 3 commits behind head on main.

Additional details and impacted files [see 4 files with indirect coverage changes](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2926/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge)
github-actions[bot] commented 3 weeks ago

Robot Results

:white_check_mark: Passed :x: Failed :next_track_button: Skipped Total Pass % :stopwatch: Duration
452 0 3 452 100 1h19m54.284447999s
reubenmiller commented 3 weeks ago

Having a command to just generate-changelog from the merged PRs is really handing. I have a suggestion to add a release note on each PR.

Though the additional text would be optional, and this text can't be accessed from the templating language (or at least not at the moment?), so it would be manual effort at release time to collect these additional texts.

didier-wenzek commented 2 weeks ago

Having a command to just generate-changelog from the merged PRs is really handing. I have a suggestion to add a release note on each PR.

Though the additional text would be optional,

Agree that only key features deserve a summary.

and this text can't be accessed from the templating language (or at least not at the moment?), so it would be manual effort at release time to collect these additional texts.

Yeah, not sure how to call this from the templating language, but github cli is expressive enough to extract all the comments containing "Release Notes", as this one:

gh pr view --json comments --jq '.comments[].body | match(".*Release Notes.*").string' 2926