Skip to content

Conversation

@dawidgora
Copy link

@dawidgora dawidgora commented Nov 18, 2025

Add GitHub-style automatic release notes generation

  • Add server-side release notes generator that discovers the base tag, gathers merged PRs and contributors, and returns formatted Markdown plus the selected previous tag for reuse.
  • Expose a /releases/generate-notes endpoint with form validation, localization strings, and UI wiring (button, previous-tag dropdown, JS handler) on the new release page to trigger note generation.
  • Cover the generator with unit tests for default and tag-fallback flows.

Screenshots

Brave Browser 2025-11-18 18 53 36 Brave Browser 2025-11-18 18 53 44 Brave Browser 2025-11-18 18 52 10 Brave Browser 2025-11-18 18 52 22

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 18, 2025
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/frontend labels Nov 18, 2025
@lunny lunny added this to the 1.26.0 milestone Nov 19, 2025
@dawidgora dawidgora force-pushed the feat/automatic-generation-of-release-notes branch from d36f97f to f32b963 Compare November 19, 2025 08:59
dawidgora added a commit to dawidgora/gitea that referenced this pull request Nov 19, 2025
@wxiaoguang
Copy link
Contributor

Also cc @techknowlogick for further review and help (#35976 (comment)) , in case you already have more discussions.

@dawidgora
Copy link
Author

In 1406ccc:

  • Added helpers so release notes pick the release immediately before the one being edited, not just the latest one
  • This avoids errors when updating notes on older releases because we now compare against the correct predecessor tag.

@dawidgora
Copy link
Author

In followup PR, when I find some time I will implement additional configuration for this feature, like it is on GitHub: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 19, 2025

Too many unnecessary if and ? for "defensive programming"
Most of them should be removed. If you write a if or ? , then you should clearly know that in which case it can happen.

Still many if and ? in code that I don't understand.


And #35977 (comment)

Also cc techknowlogick for further review and help (#35976 (comment)) , in case you already have more discussions.

@wxiaoguang wxiaoguang removed their request for review November 19, 2025 12:44
@dawidgora
Copy link
Author

dawidgora commented Nov 19, 2025

Too many unnecessary if and ? for "defensive programming"
Most of them should be removed. If you write a if or ? , then you should clearly know that in which case it can happen.

Still many if and ? in code that I don't understand.

Ok, I made it less defensive now @wxiaoguang

And #35977 (comment)

Also cc techknowlogick for further review and help (#35976 (comment)) , in case you already have more discussions.

We haven't, but @techknowlogick feel free to review my PR

@dawidgora dawidgora requested a review from wxiaoguang November 19, 2025 13:14
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, still questions (only a quick look, not carefully look into backend code yet)

@dawidgora dawidgora requested a review from wxiaoguang November 19, 2025 14:50
dummy commit

fix cs

fix

fix

remove test file
@dawidgora dawidgora force-pushed the feat/automatic-generation-of-release-notes branch from 91fb3fa to 7eebf17 Compare November 20, 2025 07:42
@wxiaoguang wxiaoguang requested review from techknowlogick and removed request for wxiaoguang November 20, 2025 07:50
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 20, 2025
Signed-off-by: silverwind <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants