Skip to content

Commit b10cbee

Browse files
committed
Refactor README.md to update authentication instructions and add environment variable explanations
1 parent 9fa3d38 commit b10cbee

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,40 @@ The language breakdown analysis tab also displays a table showing the Accepted P
7272

7373
## Setup instructions
7474

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`:
76100

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:
79101
```
80102
VUE_APP_MOCKED_DATA=false
81103
```
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_.
83107

84108
```
85-
VUE_APP_GITHUB_ORG=
86109
VUE_APP_GITHUB_TOKEN=
87110
```
88111

@@ -120,4 +143,5 @@ This project is licensed under the terms of the MIT open source license. Please
120143
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.
121144

122145
### Coming next 🔮
123-
- Enterprise level charts
146+
- Team slicing
147+
- Persistence layer

0 commit comments

Comments
 (0)