Add --repo flag for repo-scoped CI secrets and variables#446
Merged
Conversation
Switch secret and variable commands to the deployed depot.ci.v2 API, which separates org-wide and repo-scoped methods. All subcommands (add, list, remove) now accept --repo owner/name to target a specific repository. Without --repo, behavior is unchanged (org-wide). Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Stale v1 client constructors are now unused dead code
- Removed the unused v1 client constructors newCISecretServiceClient and newCIVariableServiceClient as all API functions now use v2 clients.
Or push these changes by commenting:
@cursor push a9b7073dcb
Preview (a9b7073dcb)
diff --git a/pkg/api/ci.go b/pkg/api/ci.go
--- a/pkg/api/ci.go
+++ b/pkg/api/ci.go
@@ -103,11 +103,6 @@
return allRuns, nil
}
-func newCISecretServiceClient() civ1connect.SecretServiceClient {
- baseURL := baseURLFunc()
- return civ1connect.NewSecretServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent())
-}
-
func newCISecretServiceV2Client() civ2connect.SecretServiceClient {
baseURL := baseURLFunc()
return civ2connect.NewSecretServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent())
@@ -195,11 +190,6 @@
return err
}
-func newCIVariableServiceClient() civ1connect.VariableServiceClient {
- baseURL := baseURLFunc()
- return civ1connect.NewVariableServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent())
-}
-
func newCIVariableServiceV2Client() civ2connect.VariableServiceClient {
baseURL := baseURLFunc()
return civ2connect.NewVariableServiceClient(getHTTPClient(baseURL), baseURL, WithUserAgent())…tRepoVariableValues) Made-with: Cursor
Addresses Cursor Bugbot review. newCISecretServiceClient and newCIVariableServiceClient were dead code after v1→v2 migration. Made-with: Cursor
jacobwgillespie
approved these changes
Mar 16, 2026
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.

Summary
--repo owner/nameflag todepot ci secretsanddepot ci varssubcommands (add, list, remove).depot.ci.v1to the deployeddepot.ci.v2org/repo RPCs for secret and variable management.--repois omitted, behavior is unchanged (org-wide).What was happening
The CLI could only manage org-wide secrets and variables. Repo-specific overrides had to be managed through the web UI.
What happens now
depot ci secrets add DB_URL --repo owner/repo --value "..."creates a repo-scoped secret that overrides the org-wide value at runtime.depot ci secrets list --repo owner/reposhows both org-wide and repo-specific entries with a scope column. Same pattern for variables.Companion PRs:
Made with Cursor
Note
Medium Risk
Medium risk because it changes how the CLI calls secret/variable management APIs (migrating to
ci.v2) and adds new repo-scoped paths, which could impact configuration workflows if scoping or routing is incorrect.Overview
Enables repo-scoped CI secrets and variables in the CLI via a new
--repo owner/repoflag ondepot ci secretsanddepot ci vars(add,list,remove), including updated help text and output that shows a scope column when repo context is provided.Switches secret/variable operations from
depot.ci.v1todepot.ci.v2RPCs, adding org vs repo branching inpkg/api/ci.go(newScopefield in returned metadata and list calls that can return both org-wide and repo-specific entries when--repois set).Written by Cursor Bugbot for commit 7cd4c48. This will update automatically on new commits. Configure here.