You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,17 +72,40 @@ The language breakdown analysis tab also displays a table showing the Accepted P
72
72
73
73
## Setup instructions
74
74
75
-
- Instructions on how to authenticate are provided in the [API documentation](https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-usage?apiVersion=2022-11-28)
75
+
Instructions on how to authenticate are provided in the [API documentation](https://docs.github.com/en/enterprise-cloud@latest/rest/copilot/copilot-usage?apiVersion=2022-11-28)
76
+
77
+
In the `.env` file, you can configure several environment variables that control the behavior of the application.
78
+
79
+
#### VUE_APP_SCOPE
80
+
81
+
The `VUE_APP_SCOPE` environment variable in the `.env` file determines the scope of the API calls made by the application. It can be set to either 'enterprise' or 'organization'.
82
+
83
+
- If set to 'enterprise', the application will target API calls to the GitHub Enterprise account defined in the `VUE_APP_GITHUB_ENT` variable.
84
+
- If set to 'organization', the application will target API calls to the GitHub Organization account defined in the `VUE_APP_GITHUB_ORG` variable.
85
+
86
+
For example, if you want to target the API calls to an organization, you would set `VUE_APP_SCOPE=organization` in the `.env` file.
87
+
88
+
````
89
+
VUE_APP_SCOPE=organization
90
+
91
+
VUE_APP_GITHUB_ORG= <YOUR-ORGANIZATION>
92
+
93
+
VUE_APP_GITHUB_ENT=
94
+
````
95
+
96
+
97
+
#### VUE_APP_MOCKED_DATA
98
+
99
+
To access Copilot metrics from the last 28 days via the API and display actual data, set the following boolean environment variable to `false`:
76
100
77
-
### .env file setup
78
-
- To retrieve Copilot metrics via the API and display your organization's data, configure the following boolean environment variable to false:
79
101
```
80
102
VUE_APP_MOCKED_DATA=false
81
103
```
82
-
- Additionally, update the following environment variables:
104
+
105
+
#### VUE_APP_GITHUB_TOKEN
106
+
Specifies the GitHub Personal Access Token utilized for API requests. Generate this token with the following scopes: _copilot_, _manage_billing:copilot_, _manage_billing:enterprise_, _read:enterprise_, _admin:org_.
83
107
84
108
```
85
-
VUE_APP_GITHUB_ORG=
86
109
VUE_APP_GITHUB_TOKEN=
87
110
```
88
111
@@ -120,4 +143,5 @@ This project is licensed under the terms of the MIT open source license. Please
120
143
I aim to provide support through GitHub Issues. While I strive to stay responsive, I can't guarantee immediate responses. For critical issues, please include "CRITICAL" in the title for quicker attention.
0 commit comments