Skip to content

fix: send one review credential on every gh call - #8

Merged
oakimov merged 2 commits into
mainfrom
cursor/thread-read-credential-a977
Nov 10, 2026
Merged

oakimov merged 2 commits into
mainfrom
cursor/thread-read-credential-a977

Conversation

@oakimov

@oakimov oakimov commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Ports the thread-read credential fix from cursor-opencode-provider PR 177 (head 416e8bd00f9d9c03865cdade8642c5a127de524f).

post, threads, and complete-resolutions.py pick one credential per run: the --token-env personal access token, which wins over an ambient GH_TOKEN or GITHUB_TOKEN, otherwise one App installation token. That credential is selected before the first GitHub lookup and sent as GH_TOKEN on every gh call. With no credential the command exits before calling gh. threads accepts --token-env.

scripts/review-publish.py and scripts/complete-resolutions.py match that head. The tests match it except for the existing block[1]! assertion OCP's strict test typecheck already required. docs/pr-review.md takes the same flag and publication-order wording, without the provider's CURSOR_API_KEY sentence, and the App publisher note now includes threads. The changelog records the flag and the authenticated reads.

Verified with /usr/bin/bun: typecheck and build passed. bun test ./test — 945 pass, 0 fail, 4258 expect() calls, 72 files.

Open in Web Open in Cursor 

post, threads, and complete-resolutions pick the --token-env PAT or one
App installation token before the first GitHub lookup and send it on every
gh call, including thread reads.

Co-authored-by: Oleksiy Akimov <oakimov@users.noreply.github.com>
@oakimov
oakimov merged commit 3514f15 into main Nov 10, 2026
6 checks passed
oakimov added a commit that referenced this pull request Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant