Skip to content

fix(ai-docs-sync): skip the pr author when requesting reviewers - #23

Merged
JulesFiliot merged 1 commit into
masterfrom
fix/ai-docs-sync/skip-pr-author-review
Oct 28, 2026
Merged

JulesFiliot merged 1 commit into
masterfrom
fix/ai-docs-sync/skip-pr-author-review

Conversation

@JulesFiliot

Copy link
Copy Markdown
Collaborator

With a personal DOCS_SYNC_TOKEN, the PR is authored by the token's user. When that user is also in reviewers, GitHub answers 422 ("Review cannot be requested from pull request author") and nobody gets requested (failing run).

The publish stage now drops the PR author (case-insensitive) from the user reviewers before the request and logs it. Teams are unchanged.

How to test

  1. npm test (new case in tools/ai-docs-sync/test/publish.test.mjs).
  2. In logos-web, run the docs sync with a PAT whose user is listed in reviewers: the log shows Not requesting <login>: they authored the PR and the other reviewers are requested.

@JulesFiliot

Copy link
Copy Markdown
Collaborator Author

/ai-review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review (claude-opus-5-5 + gpt-6-sol)

The change looks safe overall, but the log guard can throw if reviewers is absent from the configuration. Because this happens after the rolling branch is pushed, the publish step may stop before setting the commit status or moving the cursor. Use an empty-array fallback for the guard, consistent with reviewRequestFor.

0 critical, 0 other issue(s) shown (threshold: major).

API usage

Call Model In Cached Out Cost
reviewer-codex gpt-6-sol 7238 0 272 $0.0172
reviewer-claude claude-opus-5-5 11073 0 1051 $0.0653
synthesizer gpt-6-luna 682 0 241 $0.0002

Total ~$0.0827

@JulesFiliot
JulesFiliot merged commit 40bde83 into master Oct 28, 2026
2 checks passed
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