Skip to content

Conversation

@AbirAbbas
Copy link
Contributor

Summary

Fixes the 403 Resource not accessible by integration error that prevents the Performance Check workflow from posting comments on PRs from forks.

Problem

GitHub restricts GITHUB_TOKEN permissions on fork PRs for security. The pull-requests: write permission is ignored, causing the comment post to fail.

Solution

Split into two workflows using the workflow_run pattern:

  1. Performance Check (memory-metrics.yml) - Runs benchmarks and saves results as artifact
  2. Performance Report (memory-metrics-report.yml) - Triggered by workflow_run, downloads artifact and posts comment with base repo permissions

Changes

  • memory-metrics.yml: Replaced report job with save-results job that uploads benchmark data as artifact
  • memory-metrics-report.yml: New workflow that posts the performance comment

Test Plan

  • Trigger workflow on a fork PR to verify comments are posted correctly
  • Verify same-repo PRs still work

🤖 Generated with Claude Code

Split the Performance Check workflow into two parts to work around
GitHub's security restriction that prevents fork PRs from posting
comments.

Changes:
- memory-metrics.yml: Save benchmark results as artifact instead of
  posting comments directly
- memory-metrics-report.yml: New workflow triggered by workflow_run
  that downloads results and posts the comment with base repo
  permissions

This fixes the "Resource not accessible by integration" 403 error
that occurred when external contributors opened PRs.

Co-Authored-By: Claude <noreply@anthropic.com>
@AbirAbbas AbirAbbas merged commit a130f94 into main Jan 25, 2026
19 checks passed
@AbirAbbas AbirAbbas deleted the fix/perf-workflow-fork-pr-comments branch January 25, 2026 19:03
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.

2 participants