-
Notifications
You must be signed in to change notification settings - Fork 3
Project variables tool #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
85e2715
to
1c6ba23
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new tool for inspecting Octopus Deploy project variables, complementing the existing tenant variables tool. The tool retrieves both project variables and library variable set variables for a given project, with support for config-as-code projects that store variables in Git.
- Adds a new
get_variables
tool that fetches project and library variable set variables - Implements support for both database-stored and Git-stored variables in config-as-code projects
- Provides comprehensive type definitions for Octopus Deploy variable resources
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/tools/index.ts | Registers the new getVariables tool module |
src/tools/getVariables.ts | Implements the complete project variables tool with API integration and type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/tools/getVariables.ts
Outdated
}; | ||
} else { | ||
// For database projects, get variables directly | ||
resource = await apiClient.get<VariableSetResource>(`/api/spaces/${spaceId}/variables/${project.VariableSetId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API paths should start with ~/
so they can work with virtual folders
variableSet: allVariableSetsMap[lvs.VariableSetId], | ||
libraryVariableSet: lvs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an explanation for the model as to what variable sets and library variable sets are and their relationship with each other or is it already well understood from the response structure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if the model really needs to know about that, unless we want it to be able to modify them afterwards. Its more about evaluating the variables available to a project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just perhaps we could expand on the tool description to better describe the relationship between project / variable sets and library variable sets.
🤖 I have created a release *beep* *boop* --- ## [0.3.0](v0.2.5...v0.3.0) (2025-10-01) ### Features * Project variables tool ([#41](#41)) ([4c7d1f2](4c7d1f2)) ### Bug Fixes * Change log file path to match entry point instead of node folder ([#44](#44)) ([206b6ca](206b6ca)) * Fix SBOM build ([#42](#42)) ([9500aa4](9500aa4)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR introduces a tool for inspecting Octopus variables.
An Octopus project can have variables that come in from a number of sources:
We have an existing tool for retrieving tenant variables.
This tool complements that tool and provides functionality for retrieving project variables.
It retrieves project variables, along with library variable set variables for any linked variable sets.
This is particularly useful when combined with the deployment process tool, as it allows LLMs to drill down to discover misconfigurations or missing configurations, which are typical when iterating on your pipeline.