Skip to content

Commit 2bc64f5

Browse files
committed
fix: Update PAT requirements and remove enterprise usage example from README
1 parent e070eb0 commit 2bc64f5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Create a workflow (eg: `.github/workflows/copilot-usage.yml`). See [Creating a W
1616

1717
### PAT(Personal Access Token)
1818

19-
You will need to [create a PAT(Personal Access Token)](https://github.com/settings/tokens/new?scopes=admin:org) that has the `copilot`, `manage_billing:copilot`, `admin:org`, `admin:enterprise`, or `manage_billing:enterprise` scope to use this endpoint.
19+
You will need to [create a PAT(Personal Access Token)](https://github.com/settings/tokens/new?scopes=manage_billing:copilot) that has the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint.
2020

2121
Add this PAT as a secret so we can use it as input `github-token`, see [Creating encrypted secrets for a repository](https://docs.github.com/en/enterprise-cloud@latest/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).
2222

@@ -54,15 +54,6 @@ jobs:
5454
team: 'team-slug'
5555
```
5656
57-
#### Example get enterprise usage
58-
59-
```yml
60-
- uses: austenstone/[email protected]
61-
with:
62-
github-token: ${{ secrets.TOKEN }}
63-
enterprise: 'enterprise-slug'
64-
```
65-
6657
#### Example get CSV
6758
6859
```yml
@@ -160,14 +151,13 @@ jobs:
160151

161152
## ➡️ Inputs
162153

163-
We look first for `enterprise` input, then `team`, and finally `organization`. If none are provided, we default to the repository owner which is likely the organization.
154+
If no `organization` or `team` input are provided, we default to the repository owner which is likely the organization.
164155

165156
Various inputs are defined in [`action.yml`](action.yml):
166157

167158
| Name | Description | Default |
168159
| --- | --- | --- |
169160
| github-token | The GitHub token used to create an authenticated client | |
170-
| enterprise | The GitHub enterprise slug | |
171161
| organization | The organization slug | ${{ github.repository_owner }} |
172162
| job-summary | Whether to generate a report | true |
173163
| csv | Whether to generate a CSV as a workflow artifact | false |
@@ -191,7 +181,6 @@ Various inputs are defined in [`action.yml`](action.yml):
191181

192182
The endpoints used by this action...
193183

194-
* GET /enterprises/{enterprise}/copilot/usage
195184
* GET /orgs/{org}/team/{team}/copilot/usage
196185
* GET /orgs/{org}/copilot/usage
197186
* GET /orgs/{org}/copilot/billing

0 commit comments

Comments
 (0)