feat: add runbooks.Get for space-wide runbook queries (cherry-pick of #433) - #453
Open
NickJosevski wants to merge 1 commit into
Open
feat: add runbooks.Get for space-wide runbook queries (cherry-pick of #433)#453NickJosevski wants to merge 1 commit into
NickJosevski wants to merge 1 commit into
Conversation
The space-wide runbooks endpoint and its RunbooksQuery filter struct both already existed, but no function connected them, so callers could only reach runbooks through the project-scoped List. Add Get, following the same newclient.GetByQuery pattern used by tenants and the other resources sharing this template. This lets callers filter runbooks by project, name, or ID across a space, which the Terraform provider needs to offer a runbooks data source (OctopusDeploy/terraform-provider-octopusdeploy#209). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit a63b6c7) Co-authored-by: Scott Emberson <8268155+Scott-Emberson@users.noreply.github.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.
Cherry-pick of #433 by @Scott-Emberson, re-hosted on a branch in this repo solely so CI can run. Authorship is preserved on the commit — this is a mechanical move, not a rewrite.
Fork PRs cannot satisfy the required
testcheck:integration-tests.ymlneedssecrets.DB_IMAGE_SA_PASSWORD,OD_IMAGE_ADMIN_API_KEYandOCTOPUS_SERVER_BASE64_LICENSE, and GitHub withholds secrets frompull_requestruns originating on a fork, so the job dies at Initialize containers before any Go executes. #433 is red for that reason and no other.What it does
Six lines of production code plus a test file. The space-wide runbooks URI template and the
RunbooksQueryfilter struct both already exist in the package — nothing connected them, soRunbooksQueryis currently unreferenced. This addsGet, using the samenewclient.GetByQueryone-liner thattenants.Getand the other resources on this template already use:Purely additive — no existing signature changes. Callers could previously only reach runbooks through the project-scoped
List.Unblocks a runbooks data source in the Terraform provider (OctopusDeploy/terraform-provider-octopusdeploy#209).
Once this merges
Close #433 pointing here, so Scott gets the credit and knows it wasn't rejected.