-
Notifications
You must be signed in to change notification settings - Fork 25
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
add snapshot publish func #242
Conversation
return nil, err | ||
} | ||
|
||
path = fmt.Sprintf("%s?publish=true", path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is not "command" to publish a snapshot, this parameter is only available as a query parameter and setting it to any value causes it to publish https://github.com/OctopusDeploy/OctopusDeploy/blob/main/source/Octopus.Core/Features/RunbookSnapshots/CreateRunbookSnapshotCommandHandler.cs#L92
@@ -35,6 +45,10 @@ func (s *RunbookSnapshotService) Add(runbookSnapshot *RunbookSnapshot) (*Runbook | |||
return nil, err | |||
} | |||
|
|||
if publish { | |||
path = fmt.Sprintf("%s?publish=true", path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is not "command" to publish a snapshot, this parameter is only available as a query parameter and setting it to any value causes it to publish https://github.com/OctopusDeploy/OctopusDeploy/blob/main/source/Octopus.Core/Features/RunbookSnapshots/CreateRunbookSnapshotCommandHandler.cs#L92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading go always confuses me... Is it possible to have previous query parameters here? If so do we need to check the existing path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, spot on. The default path has no parameters on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not going to fix this now. It will probably never become a problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.