Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #52: added support for automatically generated release notes. #53

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

anenviousguest
Copy link
Contributor

  • default behavior: delegate to GitHub
  • if <description> is supplied via plugin configuration, it will be prepended to the notes autogenerated by GitHub.
Use-case Screenshot
Generated when the changes were made via pull requests image
Generated when the changes were made by directly committing into master image

…tes.

- default behavior: delegate to GitHub
- if `<description>` is supplied via plugin configuration, will be prepended to the notes autogenerated by GitHub.
@@ -207,7 +207,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>github-api</artifactId>
<version>1.317</version>
<version>1.318</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Support for auto-generated release notes was added in this very recent version.

@@ -82,7 +82,7 @@ public class UploadMojo extends AbstractMojo implements Contextualizable{
/**
* The release description
*/
@Parameter(property = "project.description")
@Parameter
Copy link
Contributor Author

@anenviousguest anenviousguest Nov 24, 2023

Choose a reason for hiding this comment

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

I'd suggest to drop project.description - from my experience, in 99% of the cases it is included in POM, but when looking at the release page on Github, we already have a context of what this codebase is about. So now that release notes will be generated, it might make less sense to have a repetitive project.description part on top of that.

Should anyone still need it, there is always a way to say in the plugin configuration:

<description>${project.description}</description>

@@ -189,6 +189,7 @@ public void execute() throws MojoExecutionException {
if (release == null) {
getLog().info("Creating release "+releaseName);
GHReleaseBuilder builder = repository.createRelease(tag);
builder.generateReleaseNotes(true);
Copy link
Contributor Author

@anenviousguest anenviousguest Nov 24, 2023

Choose a reason for hiding this comment

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

I was on the fence between having it in the else branch (that is, when description is null) vs. always adding it, and decided that GitHub is doing a better job in most of the cases. Any customization can still be added on top as specified in the previous comment.

@anenviousguest
Copy link
Contributor Author

@jutzig would very much appreciate a review. Thank you.

@anenviousguest
Copy link
Contributor Author

hi @jutzig , would be great to hear your feedback on this one.

@jutzig
Copy link
Owner

jutzig commented Nov 30, 2023

Hi @anenviousguest
Thanks again for another pull request, that sounds like a great idea. TBH, I didn't even know that github does automatic release note generation like that.
I assume following this, one can customize the default output?
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

What do you think about adding the first picture from your pull request as an example to the readme and include the link to automatic release notes description? I don't want to use the picture without permission, since it includes your user handle...

@anenviousguest
Copy link
Contributor Author

anenviousguest commented Nov 30, 2023

Hi @jutzig

I assume following this, one can customize the default output?
https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

I guess so, at least on the API page they do mention that YAML file.

What do you think about adding the first picture from your pull request as an example to the readme and include the link to automatic release notes description? I don't want to use the picture without permission, since it includes your user handle...

No prob at all, let me update the README then...

@anenviousguest
Copy link
Contributor Author

Hi @jutzig , I updated the README with your link and put a screenshot there as well.

@anenviousguest
Copy link
Contributor Author

Hi @jutzig , would appreciate a feedback on this one, thanks a lot.

@jutzig jutzig merged commit d9430d9 into jutzig:master Dec 4, 2023
@jutzig
Copy link
Owner

jutzig commented Dec 4, 2023

Thank you, looks great. I'll prepare a release now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants