Skip to content

fix: don't fail checks when the PR comment cannot be posted (fork PRs) - #66

Merged
JarbasAl merged 1 commit into
devfrom
fix/fork-pr-comment-403
Jul 16, 2026
Merged

fix: don't fail checks when the PR comment cannot be posted (fork PRs)#66
JarbasAl merged 1 commit into
devfrom
fix/fork-pr-comment-403

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jul 16, 2026

Copy link
Copy Markdown
Member

Fork PRs run the shared workflows with a read-only GITHUB_TOKEN. The sticky "OVOS PR Checks" comment update then fails with HTTP 403 and takes the whole job down with it, even when all tests passed — currently making every fork PR in every org show 7 red checks (e.g. JarbasHiveMind/HiveMind-core#138/#139/#143).

This treats 401/403 on the comment POST/PATCH as a warning: the comment is cosmetic and must never fail the check itself. All other HTTP errors still propagate.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Workflows now continue successfully when pull request comments cannot be updated due to read-only permissions.
    • Other HTTP errors continue to be reported for troubleshooting.

Fork PRs run shared workflows with a read-only GITHUB_TOKEN, so the
sticky-comment POST/PATCH returns HTTP 403 and the whole job fails even
though every test passed. Treat 401/403 on the comment update as a
warning instead of a failure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 66b8a82f-f353-46e4-943d-90e5944d7805

📥 Commits

Reviewing files that changed from the base of the PR and between 02b4bf4 and 37e3817.

📒 Files selected for processing (1)
  • scripts/update_pr_comment.py

📝 Walkthrough

Walkthrough

The PR comment update workflow moves into _update_comment, while main() handles HTTP 401 and 403 responses by warning and returning; other HTTP errors continue to propagate.

Changes

PR comment update

Layer / File(s) Summary
Comment update delegation and HTTP handling
scripts/update_pr_comment.py
main() calls _update_comment(args, content) and suppresses HTTP 401/403 errors with a stderr warning while re-raising other HTTP errors.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fork-pr-comment-403

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JarbasAl
JarbasAl marked this pull request as ready for review July 16, 2026 05:28
@JarbasAl
JarbasAl merged commit e1770fb into dev Jul 16, 2026
6 checks passed
@JarbasAl
JarbasAl deleted the fix/fork-pr-comment-403 branch July 16, 2026 05:28
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