Skip to content

feat: Add Agents variables API - #4587

Open
adamcrews wants to merge 3 commits into
google:masterfrom
adamcrews:feat/agents-variables
Open

adamcrews wants to merge 3 commits 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.

@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 (5b37d46) to head (2b93718).

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.

@gmlewis

gmlewis commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

@adamcrews - please resolve conflicts and push the changes to this PR.

@adamcrews
adamcrews force-pushed the feat/agents-variables branch from badf91c to 2b93718 Compare September 23, 2026 16:37

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @adamcrews!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @Not-Dhananjay-Mishra

Comment thread github/agents_variables_test.go Outdated
Comment thread github/agents_variables.go Outdated
Comment thread github/agents_variables.go Outdated
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.
@adamcrews
adamcrews force-pushed the feat/agents-variables branch from 2b93718 to 6edcf19 Compare September 25, 2026 17:19
@adamcrews

adamcrews commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@Not-Dhananjay-Mishra All feedback has been addressed. Thank you!

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.

3 participants