Add GitResources to CreateReleaseCommandV1#280
Open
NickJosevski wants to merge 1 commit into
Open
Conversation
Allows callers of the release-create (v1) API to specify Git references for per-step Git resources at release-creation time, matching the server's existing 'gitResources' payload field and the Octopus CLI's --git-resource flag. This unblocks the create-release GitHub Action from targeting a specific Git branch/ref for steps like 'Update Argo CD Application Manifests' (SF-2251). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The Octopus release-create (v1) API already accepts a
gitResourcesfield (an array ofStepName:GitRef/StepName:GitResourceName:GitRefentries) that binds the Git reference used for a step's Git resource at release-creation time. The Octopus CLI exposes this via--git-resource, and the Go SDK viaCreateReleaseCommandV1.GitResources.The TypeScript
CreateReleaseCommandV1interface was missing this field, so consumers (notably the create-release GitHub Action) had no way to set it.Change
Adds an optional
GitResources?: string[]toCreateReleaseCommandV1.ReleaseRepository.create()already spreads the whole command into the POST body, so no other change is required for it to reach the server.Why
Enables the create-release GitHub Action to target a specific Git branch/ref for steps such as Update Argo CD Application Manifests on version-controlled/Argo projects — e.g. deploying a feature branch to Dev from GitHub Actions (customer request SF-2251). Companion PR:
OctopusDeploy/create-release-action.Tests
Adds a unit test asserting
GitResourcesis included in the/releases/create/v1request body.🤖 Generated with Claude Code