diff --git a/install.md b/install.md index 04b7851..18c5c83 100644 --- a/install.md +++ b/install.md @@ -108,6 +108,13 @@ gh pr create --title "Install Autoloop" --body "Set up Autoloop workflows and co Report the pull request link to the user. +**Important:** Before the workflow can run, add a `COPILOT_GITHUB_TOKEN` secret to your repository: + +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**. +2. Add it to your repo: `gh aw secrets set COPILOT_GITHUB_TOKEN --value ""` + +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. + ## Step 6: Create Your First Program 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. diff --git a/tests/test_install_instructions.py b/tests/test_install_instructions.py new file mode 100644 index 0000000..eda1a37 --- /dev/null +++ b/tests/test_install_instructions.py @@ -0,0 +1,20 @@ +from pathlib import Path + + +INSTALL_MD = Path(__file__).resolve().parents[1] / "install.md" + + +def test_step5_reminds_user_to_set_copilot_github_token(): + install_md = INSTALL_MD.read_text() + + assert "`COPILOT_GITHUB_TOKEN`" in install_md + assert "user_copilot_requests=read" in install_md + assert "gh aw secrets set COPILOT_GITHUB_TOKEN" in install_md + assert "Account permissions > Copilot Requests > Read" in install_md + + +def test_step5_tells_installing_agent_to_print_reminder(): + install_md = INSTALL_MD.read_text() + + assert "When you finish Step 5, print this reminder" in install_md + assert "with the pull request link" in install_md