Description
ReleaseTemplateGitResource.GitCredentialId is tagged json:"NuGetPackageId,omitempty" — a copy-paste error. The server sends GitCredentialId, so the field never deserialises and always reads as "".
GitHubConnectionId, which the server also sends, is missing from the struct entirely.
pkg/releases/release_template_git_resource.go:12:
GitCredentialId string `json:"NuGetPackageId,omitempty"`
Steps To Reproduce
- Have a project with a step carrying a git dependency.
client.DeploymentProcesses.GetTemplate(process, channelID, "")
- Read
GitCredentialId off any entry in .GitResources.
Expected Behavior
GitCredentialId returns the credential ID the server sent.
Any Logs and/or Other Supporting Information
Raw response from the server:
{
"ActionName": "Update Argo Manifests",
"RepositoryUri": "https://github.com/.../sf2251-argo-manifests.git",
"DefaultBranch": "main",
"GitCredentialId": "GitCredentials-1",
"GitHubConnectionId": null,
"GitResourceSelectedLastRelease": { "GitRef": "refs/heads/feature-x", "GitCommit": "d65a219f..." }
}
Same call through the client:
ActionName = "Update Argo Manifests"
RepositoryUri = "https://github.com/.../sf2251-argo-manifests.git"
DefaultBranch = "main"
GitCredentialId = ""
Nothing errors — the value is silently dropped. Found while verifying #330.
Environment and/or Versions
- Octopus Server Version: 2026.x (local)
- Go Version: go1.22
- go-octopusdeploy:
main @ 1b925bc
Description
ReleaseTemplateGitResource.GitCredentialIdis taggedjson:"NuGetPackageId,omitempty"— a copy-paste error. The server sendsGitCredentialId, so the field never deserialises and always reads as"".GitHubConnectionId, which the server also sends, is missing from the struct entirely.pkg/releases/release_template_git_resource.go:12:Steps To Reproduce
client.DeploymentProcesses.GetTemplate(process, channelID, "")GitCredentialIdoff any entry in.GitResources.Expected Behavior
GitCredentialIdreturns the credential ID the server sent.Any Logs and/or Other Supporting Information
Raw response from the server:
{ "ActionName": "Update Argo Manifests", "RepositoryUri": "https://github.com/.../sf2251-argo-manifests.git", "DefaultBranch": "main", "GitCredentialId": "GitCredentials-1", "GitHubConnectionId": null, "GitResourceSelectedLastRelease": { "GitRef": "refs/heads/feature-x", "GitCommit": "d65a219f..." } }Same call through the client:
Nothing errors — the value is silently dropped. Found while verifying #330.
Environment and/or Versions
main@ 1b925bc