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

added release notes file option for create-release v6 #309

Merged
merged 4 commits into from
May 4, 2023

Conversation

benPearce1
Copy link
Contributor

@benPearce1 benPearce1 commented May 2, 2023

fixes #310

[sc-47628]

- task: OctopusCreateRelease@6
  inputs:
    OctoConnectedServiceName: 'octo'
    Space: 'Default'
    Project: 'project 2'
    ReleaseNotesFile: C:\Octopus\ha2\Logs\OctopusServer.txt

image

Specifying both release notes and release notes file throws and error

- task: OctopusCreateRelease@6
  inputs:
    OctoConnectedServiceName: 'octo'
    Space: 'Default'
    Project: 'project 2'
    ReleaseNotes: "this is a release note"
    ReleaseNotesFile: C:\Octopus\ha2\Logs\OctopusServer.txt

image

@shortcut-integration
Copy link

Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

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

Code looks good, just a comment about what we do when both release notes and release notes file is specified for consideration.

@@ -64,6 +66,13 @@ export function createCommandFromInputs(logger: Logger, task: TaskWrapper): Crea
GitCommit: task.getInput("GitCommit"),
};

if (!command.ReleaseNotes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In the cli we fail the command if both release notes and release notes file are specified, I wonder if we should do the same here to prevent customers hitting any unexpected behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, can change this to have the same behaviour

@benPearce1 benPearce1 requested a review from hnrkndrssn May 4, 2023 04:25
Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

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

Test for specifying both fields needs updating, but other than that this is 👍 now

@benPearce1 benPearce1 merged commit ef76948 into main May 4, 2023
@benPearce1 benPearce1 deleted the bp/release-notes-file branch May 4, 2023 05:06
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.

Create Release v6 doesn't support supplying notes from a file
2 participants