Skip to content

Add GitResources to CreateReleaseCommandV1#279

Closed
NickJosevski wants to merge 1 commit into
OctopusDeploy:mainfrom
NickJosevski:sf2251-git-resources
Closed

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

Conversation

@NickJosevski

Copy link
Copy Markdown
Contributor

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>
NickJosevski added a commit to NickJosevski/create-release-action that referenced this pull request Jul 17, 2026
Adds a 'git_resources' multi-line input mapping to the release-create API's
GitResources field, so a release can target a specific Git ref for a step's
Git resource at creation time (format: StepName:GitRef or
StepName:GitResourceName:GitRef).

This lets version-controlled/Argo projects deploy a feature branch from
GitHub Actions by pointing steps like 'Update Argo CD Application Manifests'
at the pushed branch (SF-2251).

Depends on OctopusDeploy/api-client.ts#279 (adds GitResources to
CreateReleaseCommandV1). The dependency is temporarily sourced from that PR
branch and must be switched to the published version before merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NickJosevski

Copy link
Copy Markdown
Contributor Author

Reopening from an in-org branch (OctopusDeploy:sf2251-git-resources) instead of a fork.

@NickJosevski
NickJosevski deleted the sf2251-git-resources branch July 17, 2026 12:18
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