Skip to content

Commit 4360ffe

Browse files
Copilotmrjf
andauthored
Add COPILOT_GITHUB_TOKEN install reminder
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent 3abaaba commit 4360ffe

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

install.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ gh pr create --title "Install Autoloop" --body "Set up Autoloop workflows and co
108108

109109
Report the pull request link to the user.
110110

111+
**Important:** Before the workflow can run, add a `COPILOT_GITHUB_TOKEN` secret to your repository:
112+
113+
1. [Create a fine-grained PAT](https://github.com/settings/personal-access-tokens/new?name=COPILOT_GITHUB_TOKEN&description=GitHub+Agentic+Workflows+-+Copilot+engine+authentication&user_copilot_requests=read) with **Account permissions > Copilot Requests > Read**.
114+
2. Add it to your repo: `gh aw secrets set COPILOT_GITHUB_TOKEN --value "<your-token>"`
115+
116+
When you finish Step 5, print this reminder with the pull request link so the user can set the secret before the first workflow run.
117+
111118
## Step 6: Create Your First Program
112119

113120
Next, suggest to the user that we create their first program, which will be added to the existing PR. If they decline, we're done. Else, continue.

tests/test_install_instructions.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from pathlib import Path
2+
3+
4+
INSTALL_MD = Path(__file__).resolve().parents[1] / "install.md"
5+
6+
7+
def test_step5_reminds_user_to_set_copilot_github_token():
8+
install_md = INSTALL_MD.read_text()
9+
10+
assert "`COPILOT_GITHUB_TOKEN`" in install_md
11+
assert "user_copilot_requests=read" in install_md
12+
assert "gh aw secrets set COPILOT_GITHUB_TOKEN" in install_md
13+
assert "Account permissions > Copilot Requests > Read" in install_md
14+
15+
16+
def test_step5_tells_installing_agent_to_print_reminder():
17+
install_md = INSTALL_MD.read_text()
18+
19+
assert "When you finish Step 5, print this reminder" in install_md
20+
assert "with the pull request link" in install_md

0 commit comments

Comments
 (0)