|
38 | 38 |
|
39 | 39 | Thanks for your first contribution, @{{username}}. We're glad you're here.
|
40 | 40 | secrets:
|
41 |
| - token: ${{ secrets.GH_PAT }} |
| 41 | + token: ${{ secrets.GH_PAT_AUTO_COMMENTS }} |
42 | 42 | ```
|
43 | 43 |
|
44 | 44 | ## How to Create a Personal Access Token (PAT)
|
@@ -83,17 +83,31 @@ When creating a fine-grained personal access token, you'll need to configure the
|
83 | 83 |
|
84 | 84 | After generating the token, you need to add it as a repository secret:
|
85 | 85 |
|
86 |
| -### Adding Repository Secrets |
| 86 | +### Adding Repository or Organization Secrets |
87 | 87 |
|
| 88 | +You can configure this workflow with either a repository-level secret or an organization-level secret: |
| 89 | +
|
| 90 | +#### For Repository-Level Secret: |
88 | 91 | 1. Go to your repository
|
89 | 92 | 2. Click on "Settings"
|
90 | 93 | 3. In the left sidebar, click on "Secrets and variables" → "Actions"
|
91 | 94 | 4. Click "New repository secret"
|
92 |
| -5. Name the secret `GH_PAT` (to match the example-usage.yml) |
93 |
| - - **Note**: Secret names must NOT start with `GITHUB_` as this prefix is reserved by GitHub |
| 95 | +5. Name the secret `GH_PAT_AUTO_COMMENTS` |
94 | 96 | 6. Paste your token value
|
95 | 97 | 7. Click "Add secret"
|
96 | 98 |
|
| 99 | +#### For Organization-Level Secret: |
| 100 | +1. Go to your organization's main page |
| 101 | +2. Click on "Settings" |
| 102 | +3. In the left sidebar, click on "Secrets and variables" → "Actions" |
| 103 | +4. Click "New organization secret" |
| 104 | +5. Name the secret `GH_PAT_AUTO_COMMENTS` |
| 105 | +6. Choose your repository access policy (all repositories or select repositories) |
| 106 | +7. Paste your token value |
| 107 | +8. Click "Add secret" |
| 108 | + |
| 109 | +Both repository-level and organization-level secrets are accessed the same way in workflows: `${{ secrets.GH_PAT_AUTO_COMMENTS }}`. |
| 110 | + |
97 | 111 | ### References
|
98 | 112 | For more detailed information about GitHub tokens and permissions, refer to the [GitHub documentation on fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token).
|
99 | 113 |
|
|
0 commit comments