Skip to content

Commit d6a3844

Browse files
committed
Add .env file and update GitHub API credentials
1 parent 45589b2 commit d6a3844

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VUE_APP_GITHUB_ORG=
2+
VUE_APP_GITHUB_TOKEN=

src/api/GitHubApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import { Metrics } from "../model/MetricsData";
99

1010
export const getGitHubCopilotMetricsApi = async (): Promise<Metrics[]> => {
1111
const response = await axios.get(
12-
"https://api.github.com/orgs/toussaintt/copilot/usage",
12+
`https://api.github.com/orgs/${process.env.VUE_APP_GITHUB_ORG}/copilot/usage`,
1313
{
1414
headers: {
1515
Accept: "application/vnd.github+json",
16-
Authorization: "Bearer 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",
16+
Authorization: `Bearer ${process.env.VUE_APP_GITHUB_TOKEN}`,
1717
"X-GitHub-Api-Version": "2022-11-28",
1818
},
1919
}

0 commit comments

Comments
 (0)