Skip to content

feat: Add Agents variables API - #4587

Open
adamcrews wants to merge 1 commit into
google:masterfrom
adamcrews:feat/agents-variables
Open

adamcrews wants to merge 1 commit into
google:masterfrom
adamcrews:feat/agents-variables

Conversation

@adamcrews

@adamcrews adamcrews commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds repository and organization Agents variables support on AgentsService (list/get/create/update/delete variables, list repository organization variables, and selected-repository management), modeled on the existing ActionsService variables client and the Agents secrets client from #4533. (I'm sorry I missed this on my last PR)

The Agents endpoints are only served by the 2026-03-10 API version, so each request sends it explicitly via WithVersion. openapi_operations.yaml pins the documentation links for these operations through operation_overrides, scoped only to the new Agents variables operations — the rest of the client stays on 2022-11-28.

Reuses the existing ActionsVariable / request types for response and request bodies.

GitHub API docs: https://docs.github.com/rest/agents/variables

Testing

gofmt, go vet, go generate ./..., and go test ./... all pass.

AI assistance disclosure

Cursor was used to draft the implementation & tests, but all code has been human reviewed and used in my github org.

Add repository and organization Agents variables support on
AgentsService, modeled on ActionsService variables and the Agents
secrets client. Pin docs links via operation_overrides and send
apiVersion 2026-03-10 with WithVersion on each request.
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.60%. Comparing base (9dc5ad3) to head (badf91c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4587      +/-   ##
==========================================
+ Coverage   98.59%   98.60%   +0.01%     
==========================================
  Files         197      198       +1     
  Lines       18326    18511     +185     
==========================================
+ Hits        18068    18253     +185     
  Misses        258      258              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants