Skip to content

Conversation

@tjcouch-sil
Copy link

I looked into how body, bodyFile, omitBody, omitBodyDuringUpdate, and generateReleaseNotes work together and decided it seemed that the most consistent thing to do in this situation was to make omitBodyDuringUpdate only relate to adding body or bodyFile. It seems generateReleaseNotes happens whether or not you provide omitBody on creation, so I made the same thing happen on updates for consistency.

@ncipollo I can't seem to figure out how to get yarn build to make any changes. I'm not sure what's wrong with my setup. I am running yarn 1.22.22. yarn test doesn't seem to work either. npm run format doesn't change anything. Please advise. Thanks!

Resolves #513

@ncipollo
Copy link
Owner

I think the fix here may be even simpler - Instead we should update this check:

if (this.inputs.generateReleaseNotes) {

I think we just need to add a check for not omitBodyDuringUpdate here and it will resolve your issue. (i.e it will prevent us from generating the body if that flag is set).

@tjcouch-sil
Copy link
Author

tjcouch-sil commented Apr 10, 2025

I considered that, too, but I decided against it for a couple reasons:

  1. It feels like it goes against the spirit of Regenerate release notes on release updates #497 (new release notes would not be generated)
  2. It is not consistent with how omitBody works. When omitBody is true and generateReleaseNotes is true, release notes are still generated.

I thought the best solution would be to get the release body, detect the changelog, and replace it with a newly generated changelog. However, that also would not be consistent and takes some more thought than I'm willing to give at the current moment (especially since release notes can be different than default if you have a .github/release.yml file).

Also, do you know why yarn build isn't producing any changes? I see the place in dist/index.js that should be changing, but it just doesn't.

@ncipollo
Copy link
Owner

Why would that be inconsistent? If you've explicitly indicated that you do not want to override the body during updates then I think it makes sense to suppress the auto-generated release notes.

@tjcouch-sil
Copy link
Author

My thought process is this: "On creation, I'm saying to omit the body but generate the release notes. That generates release notes. Later, on update, I'm saying to omit the body but generate the release notes. I suppose that should generate release notes, too." It just seems that generateReleaseNotes always generates release notes on creation regardless of omitBody, so it should always generate release notes on update regardless of omitBodyOnUpdate.

Of course, I defer to your preference and decision. Either way works fine for what I am trying to do :) I just don't want to cause any heartache if users are expecting release notes to regenerate when they update.

Thank you for your consideration!

@ncipollo
Copy link
Owner

I believe I have resolved this via #517

@ncipollo ncipollo closed this May 14, 2025
@tjcouch-sil
Copy link
Author

Thanks! I think it would be helpful to mention in the generateReleaseNotes section of the readme that release notes are not regenerated if omitBodyDuringUpdate is true. Would you mind also mentioning this?

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.

bodyFile is removed on updates - possibly generateReleaseNotes does not respect omitBodyDuringUpdate

2 participants