mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-26 01:39:51 +01:00
Managed GitHub App connections cannot write to repositories belonging to external organizations where the Paperclip GitHub App is not installed, even when those repositories are public. Previously, every GitHub 403 'Resource not accessible by integration' error mapped to github_access_denied and told users and agents to click Manage GitHub access / Refresh access, and no check stopped approval cards from being posted for targets outside the App's installed accounts. This change: - Adds github_repo_outside_app_installations classification, target extraction, and managed GitHub App reachability pre-checking in server/src/services/tool-access/github-access-errors.ts. - Pre-checks approval-requiring managed GitHub writes against the grant's installed accounts (installationOwnerLogins + personal login) before posting an approval card, denying unreachable external-org writes without wasting a human approval or poisoning idempotency keys. - Distinguishes runtime 403 integration denials on external orgs from missing repository grants on installed orgs (or the user's personal account) across tool-gateway.ts, routes/tool-gateway.ts, tool-action-delivery.ts, continuation-cause.ts, and agent-task-run-telemetry.ts. - Renders a dedicated IssueThreadInteractionCard alert explaining that refreshing access cannot grant write permission to external organizations where the App is not installed (without a dead-end Manage GitHub access link), while keeping Manage GitHub access for github_access_denied. Co-Authored-By: Paperclip <noreply@paperclip.ing>