feat: Add Agents secrets API - #4533
Open
adamcrews wants to merge 1 commit into
Open
Conversation
Add AgentsService with the repository and organization secret methods, selected-repository management, and generated list iterators, modeled on the Actions secrets client. The Agents endpoints are only served by the 2026-03-10 API version, so each request sends it with WithVersion and openapi_operations.yaml pins the documentation links through operation_overrides. Both are scoped to the new Agents operations, leaving the rest of the client on 2022-11-28.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4533 +/- ##
==========================================
+ Coverage 98.53% 98.55% +0.01%
==========================================
Files 195 196 +1
Lines 17851 18045 +194
==========================================
+ Hits 17590 17784 +194
Misses 261 261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Sep 9, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @adamcrews!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
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
Adds
AgentsServicewith repository and organization secret support (public key, list/get/create-or-update/delete secrets, and selected-repository management), modeled on the existingActionsServicesecrets client.The Agents endpoints are only served by the
2026-03-10API version, so each request sends it explicitly viaWithVersion.openapi_operations.yamlpins the documentation links for these operations throughoperation_overrides, scoped only to the new Agents operations — the rest of the client stays on2022-11-28.GitHub API docs: https://docs.github.com/rest/agents/secrets
Testing
gofmt,go vet,go generate ./..., andgo test ./...all pass.AI assistance disclosure
Cursor was used to draft the implementation & tests, but all code has been human reviewed and used locally to configure our github org.