Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for connecting via GitHub App #25

Open
JackColeman opened this issue May 1, 2024 · 1 comment
Open

Support for connecting via GitHub App #25

JackColeman opened this issue May 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@JackColeman
Copy link

In the .env file, there is an option to connect with a GitHub Personal Access Token:

VUE_APP_GITHUB_TOKEN=

In large organizations, there are policies against over granting privileges to tokens for sensitive things like copilot billing and usage. Following the principle of least privilege, we are required to access sensitive data via a GitHub app.

Support for connecting through a GitHub app would allow us to use this project as is. For example:

VUE_APP_GITHUB_KEY=<name of the private key file>
VUE_APP_GITHUB_APPLICATION_ID=<application ID>
VUE_APP_GITHUB_INSTALLATION_ID=<installation ID>

A workaround is to extract the data from the GitHub Copilot Usage endpoint, and store it in a file called
src/resources/metricsExample.json and set VUE_APP_MOCKED_DATA=true. This would require additional automation, and the preferred way would be to pull real time data from the API with a GitHub App.

@martedesco martedesco added the enhancement New feature or request label May 1, 2024
@martedesco
Copy link
Collaborator

Thanks for the suggestion @JackColeman - it makes sense. With the GitHub App approach, it would be possible to fetch Copilot usage metrics for organization and Teams but not for Enterprise members. cc: @djopatrny , for awareness

I am adding this one as an enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants