Skip to content

[4.x] Add the Copilot API package - #77

Open
Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-github-copilot
Open

Hackwar wants to merge 1 commit into
joomla-framework:4.x-devfrom
Hackwar:4.x-github-copilot

Conversation

@Hackwar

@Hackwar Hackwar commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Part of bringing joomla/github up to the current GitHub REST API (phases 1–3 of the modernisation plan). Purely additive: no existing method changes signature or behaviour.

Adds $github->copilot, a container with one sub-package per area: cloudAgentManagement, codeReview, codingAgentManagement, contentExclusionManagement, teamCustomizations, usageMetrics and userManagement (33 operations).

Notes for review

  • Enterprise-level Copilot endpoints are not included.
  • Seat removal sends a DELETE with a JSON body.
  • Daily usage reports accept 200 or 204 (no data for that day).
  • The test run shows a few more "Creation of dynamic property" deprecations than 4.x-dev because the container test resolves the sub-packages; they come from the existing AbstractPackage::__get() (see [4.x] Cache the package objects without dynamic properties (PHP 8.2) #64), not from this code.

How it was built

Generated from GitHub's official OpenAPI description (github/rest-api-description, api.github.com). Every non-deprecated operation of the category is covered; /enterprises/* endpoints are left out, as the library targets github.com.

Conventions shared by all package PRs: path parameters first, then required body fields, then array $options (optional body fields), array $filters (optional query parameters) and $page, $limit for paginated endpoints; free-form path segments are rawurlencode()d; create-or-update operations are called createOrUpdate…; 204 responses return nothing, 302 downloads return the Location URL, "check" endpoints return a boolean.

Testing Instructions

vendor/bin/phpunit: every new method has a success test (HTTP verb, exact URL and query, exact JSON body, return value) and a failure test. phpcs and phpstan report no errors.

77 new tests.

Documentation Changes Required

Adds docs/copilot.md. The @property-read line in Github.php and the link from docs/index.md are added together for all new packages in #67, to keep these PRs from conflicting with each other.

🤖 Generated with Claude Code

Adds Joomla\Github\Package\Copilot ($github->copilot) with sub-packages for
every Copilot REST subcategory: user management (seats), code review, coding
agent management, cloud agent management, content exclusion, team
customizations and usage metrics, with tests and docs/copilot.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant