Skip to content

Commit 4bb9921

Browse files
dev/agents: Instruct agents to read PR check comments (#1993)
Tells agents that the spelling, links, and redirects checks comment on the PR, how to read those comments with `gh`, and to follow the instructions in them rather than working around a finding. Verified the two `gh api` commands against #1989. Co-authored-by: Amp <amp@ampcode.com>
1 parent d4067a7 commit 4bb9921

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,25 @@ npm run check -- links --check-anchors --check-self-links \
4040
--check-external --diff <(git diff -U0 origin/main)
4141
```
4242

43+
### PR check comments
44+
45+
The spelling, links, and redirects checks comment on the PR: a summary
46+
comment per check, plus an inline review comment with a `suggestion` block on
47+
each flagged line. After pushing, read them and follow the instructions they
48+
give (fix the spelling, the link, or the redirect); do not work around a
49+
finding, and add a word to `cspell-allow-list.txt` only when it is correct.
50+
51+
```sh
52+
gh pr checks <pr>
53+
gh api repos/sourcegraph/docs/issues/<pr>/comments --paginate --jq '.[].body'
54+
gh api repos/sourcegraph/docs/pulls/<pr>/comments --paginate \
55+
--jq '.[] | "\(.path):\(.line)\n\(.body)\n"'
56+
```
57+
58+
Fork PRs get no comments; the findings are in the job log
59+
(`gh run view <run-id> --log`). The checks resolve their own comments on the
60+
next run.
61+
4362
### Vercel build failures
4463

4564
- Vercel shows build logs only to its team members, so

0 commit comments

Comments
 (0)