Skip to content

Commit e588ee7

Browse files
authored
Expand token creation documentation in README (#9)
1 parent 845d48f commit e588ee7

File tree

1 file changed

+95
-8
lines changed

1 file changed

+95
-8
lines changed

README.md

Lines changed: 95 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,101 @@ A template to get started with [GitHub Agentic Workflows](https://githubnext.git
44

55
## Quick Setup
66

7-
To use Copilot in your workflows, configure a GitHub token:
8-
9-
1. Create a [Personal Access Token](https://github.com/settings/personal-access-tokens/new) with **Copilot Requests** permission
10-
2. Add it as a repository secret named `COPILOT_GITHUB_TOKEN`:
11-
- Go to **Settings** > **Secrets and variables** > **Actions**
12-
- Click **New repository secret**
13-
- Name: `COPILOT_GITHUB_TOKEN`
14-
- Paste your token and click **Add secret**
7+
To use GitHub Agentic Workflows with Copilot, you need to configure a `COPILOT_GITHUB_TOKEN`. GitHub Actions provides a default `GITHUB_TOKEN` automatically, but it doesn't have the permissions needed for Copilot features.
8+
9+
### Setting Up Your Copilot Token
10+
11+
#### Step 1: Create the Token
12+
13+
- [ ] Go to [GitHub Settings → Personal Access Tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens/new)
14+
- [ ] Configure the token:
15+
- **Token name**: "Copilot Agentic Workflows"
16+
- **Resource owner**: Your user account
17+
- **Repository access**: Choose "Public repositories" or select specific repos
18+
- **Permissions**:
19+
- **Account permissions****Copilot Requests**: Access ✅ (Required)
20+
- [ ] Click **Generate token** and copy the token value
21+
22+
#### Step 2: Add Token to Your Repository
23+
24+
- [ ] Go to your repository → **Settings****Secrets and variables****Actions**
25+
- [ ] Click **New repository secret**
26+
- [ ] Enter the secret name: `COPILOT_GITHUB_TOKEN`
27+
- [ ] Paste your token value
28+
- [ ] Click **Add secret**
29+
30+
That's it! Your workflows can now use Copilot.
31+
32+
### Additional Tokens (Advanced)
33+
34+
For advanced workflows, you may need additional tokens:
35+
36+
| Token Name | When You Need It | Required For |
37+
|------------|------------------|--------------|
38+
| `GH_AW_GITHUB_TOKEN` | Cross-repo operations | Accessing other repositories, remote GitHub tools |
39+
| `GH_AW_PROJECT_GITHUB_TOKEN` | GitHub Projects v2 | Creating/updating project boards |
40+
| `GH_AW_AGENT_TOKEN` | Agent assignments | Assigning Copilot bots to issues/PRs |
41+
42+
<details>
43+
<summary><b>Creating Cross-Repository Token</b></summary>
44+
45+
For workflows that need to access multiple repositories:
46+
47+
- [ ] Go to [GitHub Settings → Personal Access Tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens/new)
48+
- [ ] Configure the token:
49+
- **Token name**: "Agentic Workflows Cross-Repo"
50+
- **Repository access**: "All repositories" or select specific repos
51+
- **Permissions**:
52+
- **Repository permissions**:
53+
- **Contents**: Read (minimum) or Read+Write (for creating PRs)
54+
- **Issues**: Read+Write (for issue operations)
55+
- **Pull requests**: Read+Write (for PR operations)
56+
- [ ] Click **Generate token** and copy the token value
57+
- [ ] Add to repository secrets as `GH_AW_GITHUB_TOKEN`
58+
59+
</details>
60+
61+
<details>
62+
<summary><b>Creating Projects Token</b></summary>
63+
64+
For workflows that manage GitHub Projects:
65+
66+
**For User-owned Projects:**
67+
- Use a [Classic PAT](https://github.com/settings/tokens/new) with `project` scope
68+
- Fine-grained PATs do **not** work with user-owned Projects
69+
70+
**For Organization-owned Projects:**
71+
- [ ] Go to [GitHub Settings → Personal Access Tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens/new)
72+
- [ ] Configure the token:
73+
- **Token name**: "Agentic Workflows Projects"
74+
- **Repository access**: Select specific repos or "All repositories"
75+
- **Organization permissions** (must be explicitly granted):
76+
- **Organization access**: Grant to the target organization
77+
- **Projects**: Read+Write
78+
- [ ] Click **Generate token** and copy the token value
79+
- [ ] Add to repository secrets as `GH_AW_PROJECT_GITHUB_TOKEN`
80+
81+
</details>
82+
83+
<details>
84+
<summary><b>Creating Agent Assignment Token</b></summary>
85+
86+
For workflows that assign Copilot bots to issues or pull requests:
87+
88+
- [ ] Go to [GitHub Settings → Personal Access Tokens → Fine-grained tokens](https://github.com/settings/personal-access-tokens/new)
89+
- [ ] Configure the token:
90+
- **Token name**: "Agentic Workflows Agent"
91+
- **Repository access**: Select specific repos
92+
- **Permissions**:
93+
- **Repository permissions**:
94+
- **Actions**: Write
95+
- **Contents**: Write
96+
- **Issues**: Write
97+
- **Pull requests**: Write
98+
- [ ] Click **Generate token** and copy the token value
99+
- [ ] Add to repository secrets as `GH_AW_AGENT_TOKEN`
100+
101+
</details>
15102

16103
## Debugging Workflows
17104

0 commit comments

Comments
 (0)