Possible to extend this viewer to Copilot chat as a copilot extensions?
One concern is about the priviledge. currently, only org admin can fetch metrics data from Github API. and we want every user in the org can view its org's metrics from chat .
based on [https://docs.github.com/en/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github#fetching-resources-from-the-github-api]
Requests to your Copilot agent will receive an X-Github-Token header. This header contains an API token that can be used to fetch resources from the GitHub API on behalf of the user interacting with your agent. The permissions of this token are the overlap of the user's own permissions and the permissions granted to your GitHub App installation.
the way I understand it, overlap means - if user has permission to view metrics, and that's the permission API was registered with - you can request that scope.
If a user doesn't have access to manage copilot, but app registration requested that scope - the on behalf of call is going to fail.