Repository navigation
Fixes #513 Don't generate release notes if omitBody is set - #517
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes #513 by ensuring that release notes are not generated during an update when the input omitBodyDuringUpdate is set. Key changes include adding the new input property to the Inputs interface and class, updating the logic in Action.ts to conditionally bypass release notes generation, and extending test coverage to verify the new behavior.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Inputs.ts | Adds the omitBodyDuringUpdate input and implements corresponding getters. |
| src/Action.ts | Modifies release update logic to conditionally generate release notes. |
| tests/Integration.test.ts | Updates integration tests with the new omitBodyDuringUpdate property. |
| tests/Inputs.test.ts | Adds tests for the omitBodyDuringUpdate behavior. |
| tests/Action.test.ts | Extends tests verifying that release notes are not generated when omitBodyDuringUpdate is true. |
| @@ -217,17 +218,21 @@ export class CoreInputs implements Inputs { | |||
| return this.body | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
[nitpick] The separation between the instance getter 'updateOnlyUnreleased' and the static getter 'omitBodyDuringUpdate' may be confusing to future maintainers. Consider adding inline documentation to clarify the distinct roles and intended usage of these two getters.
| /** | |
| * Instance-level getter to determine if updates should only apply to unreleased versions. | |
| * This is based on the current instance's context and retrieves the value from the input. | |
| */ |
| @@ -93,7 +93,7 @@ export class Action { | |||
| private async updateRelease(id: number): Promise<UpdateReleaseResponse> { | |||
| let releaseBody = this.inputs.updatedReleaseBody | |||
|
|
|||
There was a problem hiding this comment.
[nitpick] Although the conditional logic is correct, an inline comment explaining why omitBodyDuringUpdate is negated in this condition would improve clarity for future code maintenance.
| // Only update the release body with generated release notes if omitBodyDuringUpdate is false. |
When updating a release, we not take the
omitBodyDuringUpdateinput into account before we generated release notes (so body doesn't get replaced).