Skip to content

ci: fix PR comment for fork PRs#102

Merged
greatgitsby merged 2 commits intomasterfrom
ci-pr-comment-pull-request-target
Apr 1, 2026
Merged

ci: fix PR comment for fork PRs#102
greatgitsby merged 2 commits intomasterfrom
ci-pr-comment-pull-request-target

Conversation

@greatgitsby
Copy link
Copy Markdown
Collaborator

Summary

  • PR profile comments fail for fork PRs because GITHUB_TOKEN on pull_request events from forks is read-only
  • Moved comment posting to a separate pull_request_target workflow that gets write permissions (matching openpilot's pattern)
  • New workflow waits for build-system to succeed, downloads the rootfs-profile artifact, generates the diff, and posts the comment

Test plan

  • Verify existing PRs from repo members still get profile comments
  • Verify PRs from forks get profile comments without permission errors

🤖 Generated with Claude Code

greatgitsby and others added 2 commits March 31, 2026 18:37
GITHUB_TOKEN for pull_request events from forks only gets read permissions,
so the rootfs profile comment fails. Move the comment posting to a separate
workflow using pull_request_target (which runs in the base repo context with
write permissions), matching openpilot's pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greatgitsby greatgitsby merged commit d93e949 into master Apr 1, 2026
3 checks passed
@greatgitsby greatgitsby deleted the ci-pr-comment-pull-request-target branch April 1, 2026 01:55
mpurnell1 pushed a commit to mpurnell1/vamOS that referenced this pull request Apr 2, 2026
* ci: fix PR comment for fork PRs using pull_request_target

GITHUB_TOKEN for pull_request events from forks only gets read permissions,
so the rootfs profile comment fails. Move the comment posting to a separate
workflow using pull_request_target (which runs in the base repo context with
write permissions), matching openpilot's pattern.

* ci: rename pr-comment.yml to profile.yml
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