Skip to content

Commit 596858b

Browse files
committed
fix(skills): verify paginated Codex reactions
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 10532bd commit 596858b

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.agents/skills/pr-review-loop/SKILL.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ invalidate the code-head review unless it changes the scope being reviewed.
5757
Check the PR body reactions first, and verify the reacting actor:
5858

5959
```bash
60-
gh api "repos/<owner>/<repo>/issues/<number>/reactions" \
60+
gh api "repos/<owner>/<repo>/issues/<number>/reactions" --paginate --slurp \
6161
-H "Accept: application/vnd.github+json" \
62-
| jq '[.[] | select(.user.login == "chatgpt-codex-connector[bot]")
62+
| jq '[.[][] | select(.user.login == "chatgpt-codex-connector[bot]")
6363
| {content, created_at, user: .user.login}]'
6464
```
6565

@@ -72,8 +72,22 @@ the current head prefix:
7272

7373
```bash
7474
gh api "repos/<owner>/<repo>/issues/<number>/comments" --paginate \
75-
| jq '[.[] | select(.user.login | test("chatgpt-codex-connector"))
76-
| {created_at, html_url, body: .body[0:240], reactions: .reactions}]'
75+
--slurp \
76+
| jq '[.[][] | select(.user.login | test("chatgpt-codex-connector"))
77+
| {id, created_at, html_url, body: .body[0:240]}]'
78+
```
79+
80+
For a relevant Codex issue comment, verify any approval reaction by actor. The
81+
aggregate reaction counts on the comment do not identify who reacted:
82+
83+
```bash
84+
gh api "repos/<owner>/<repo>/issues/comments/<comment-id>/reactions" \
85+
--paginate --slurp \
86+
-H "Accept: application/vnd.github+json" \
87+
| jq '[.[][]
88+
| select(.user.login == "chatgpt-codex-connector[bot]"
89+
and .content == "+1")
90+
| {content, created_at, user: .user.login}]'
7791
```
7892

7993
Finally, query GraphQL review threads. GitHub records comment placement SHAs in

0 commit comments

Comments
 (0)