BreadMoirai / github-release-gradle-plugin

A Gradle Plugin to send Releases to Github
Apache License 2.0
108 stars 26 forks source link

Add support for github generated changelogs #51

Closed ahatzz11 closed 2 years ago

ahatzz11 commented 2 years ago

Github allows for automatically generated changelogs on a release: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes

This is available through their CLI gh tool as --generate-release-notes. Looking at this repo a bit it seems like it uses the API so that has an option too: https://docs.github.com/en/rest/releases/releases#generate-release-notes-content-for-a-release

It would be awesome if this library had something similar, something maybe like

githubRelease {
    repo("repo")
    tagName(semver.versionTagName)
    body(autoGenerated())               // <-- something like this
}

I might be able to help with this contribution depending on if it's something that would be possible to do 👍

ahatzz11 commented 2 years ago

I took a stab at this in #52 👀

The implementation changed a bit from what I first imagined since github natively supports this on the POST call.

githubRelease {
    generateReleaseNotes(true)
}