github-copilot-resources / copilot-metrics-viewer

Tool to visualize the Copilot metrics provided via the Copilot Business Metrics API (current in public beta)
https://copilot-metrics-viewer-gthcc5cmd9ebf2ff.westeurope-01.azurewebsites.net/
MIT License
284 stars 139 forks source link

Enterprise Seats Usage shows as 0 in docker deployment #88

Closed acheremisov closed 1 month ago

acheremisov commented 2 months ago

Using latest Docker image (latest, 1.7) shows 0 seat usage Tried to cURL directly all data is there

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer TOKEN" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/enterprises/ENTERPRISE_NAME/copilot/billing/seats

Screenshot

muminkoykiran commented 2 months ago

Why limit existing features of the app instead of developing it further?

image

https://github.com/github-copilot-resources/copilot-metrics-viewer/blob/main/src/api/ExtractSeats.ts#L16-L18

It is intentional to disable this feature due to the addition of the sections I mentioned above. I can still access the seat list of the enterprise account with the API.

martedesco commented 2 months ago

It is not intentional :) It was just not updated yet as the Enterprise seats API came later! I will take a look at it later this week and raise a PR for it, if nobody does it sooner.

dcieslak19973 commented 2 months ago

I think I addressed that here: https://github.com/github-copilot-resources/copilot-metrics-viewer/pull/76

martedesco commented 1 month ago

Thanks for the contribution @dcieslak19973 ! PR Merged 🎉