Motivation
As we continue to explore usage of GitHub Copilot within our organization, it would be helpful to also have access to the assigned seats (and if they are used or not). Looking at the copilot-metrics-viewer project, specifically we are interested in being able to create a view like this, which seems like it makes use of data from the /copilot/billing/seats endpoint.
(This same item was submitted as a Port feature request via Canny here - in an effort to get this sooner rather than later, I am willing to submit a PR to add this additional functionality.)
Proposed Changes
Add three new endpoints (based on the GET endpoints available here):
- COPILOT_ORGANIZATION_BILLING = "orgs/{org}/copilot/billing"
- COPILOT_ORGANIZATION_SEATS = "orgs/{org}/copilot/billing/seats"
- COPILOT_USER_SEAT = "orgs/{org}/members/{username}/copilot"
Update github_client.py with three new functions:
- get_billing_info_for_organization()
- get_seat_assignments_for_organization()
- get_seat_assignment_for_user()
Add two new kinds to main.py with corresponding sync functions:
- COPILOT_ORGANIZATION_BILLING = "copilot-organization-billing"
- on_resync_copilot_organization_billing()
- COPILOT_SEAT_ASSIGNMENTS = "copilot-seat-assignments"
- on_resync_copilot_seat_assignments()
Are you willing to submit a PR?
Motivation
As we continue to explore usage of GitHub Copilot within our organization, it would be helpful to also have access to the assigned seats (and if they are used or not). Looking at the copilot-metrics-viewer project, specifically we are interested in being able to create a view like this, which seems like it makes use of data from the /copilot/billing/seats endpoint.
(This same item was submitted as a Port feature request via Canny here - in an effort to get this sooner rather than later, I am willing to submit a PR to add this additional functionality.)
Proposed Changes
Add three new endpoints (based on the GET endpoints available here):
Update
github_client.pywith three new functions:Add two new kinds to
main.pywith corresponding sync functions:Are you willing to submit a PR?