Skip to content

Add GitResources to CreateReleaseCommandV1#280

Open
NickJosevski wants to merge 1 commit into
mainfrom
sf2251-git-resources
Open

Add GitResources to CreateReleaseCommandV1#280
NickJosevski wants to merge 1 commit into
mainfrom
sf2251-git-resources

Conversation

@NickJosevski

Copy link
Copy Markdown

Background

The Octopus release-create (v1) API already accepts a gitResources field (an array of StepName:GitRef / StepName:GitResourceName:GitRef entries) 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 via CreateReleaseCommandV1.GitResources.

The TypeScript CreateReleaseCommandV1 interface was missing this field, so consumers (notably the create-release GitHub Action) had no way to set it.

Change

Adds an optional GitResources?: string[] to CreateReleaseCommandV1. 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 GitResources is included in the /releases/create/v1 request body.

🤖 Generated with Claude Code

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>
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.

1 participant