Skip to content

Commit 5b8902b

Browse files
Add README notes
1 parent 2d6d61c commit 5b8902b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333

3434
# Optional. Whether or not to actually perform the permissions update. Defaults to false.
3535
dry-run: false
36+
37+
# Required. The GitHub token to use for the permissions update.
38+
# See "github-token" section below for more details.
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
3640
```
3741
3842
### Parameters
@@ -41,6 +45,19 @@ jobs:
4145
| --- | --- | --- |
4246
| `file-path` | The path to the CODEOWNERS file to format. Will auto-detect if not passed in. | `CODEOWNERS` |
4347
| `dry-run` | Whether or not to actually perform the permissions update. | `false` |
48+
| `github-token` | The GitHub token to use for the permissions update. | - |
49+
50+
#### `github-token`
51+
52+
If you are running this action in an org-scoped repository that will be operating on organization teams, you will likely need a personal access token (PAT) with the following scopes:
53+
54+
- `repo`: in order to add teams/collaborators to the repository.
55+
- `read:org`: in order to list organization teams and their permissions on the repository.
56+
57+
If you instead are using a GitHub App's [installation token](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation), you will need to grant the following permissions to the token:
58+
59+
- `contents: write`: in order to write teams/collaborators to the repository.
60+
- `members: read`: in order to list organization teams and their permissions on the repository.
4461

4562
## Development
4663

0 commit comments

Comments
 (0)