Skip to content

Fix PR Probe result comments, update changelog#86

Merged
MDA2AV merged 1 commit intomainfrom
fix/pr-probe-comment
Feb 16, 2026
Merged

Fix PR Probe result comments, update changelog#86
MDA2AV merged 1 commit intomainfrom
fix/pr-probe-comment

Conversation

@MDA2AV
Copy link
Owner

@MDA2AV MDA2AV commented Feb 16, 2026

Root cause: pull_request events from forks always get a read-only
GITHUB_TOKEN, regardless of the permissions: block. So gh pr comment fails for
external contributors.

Fix — two-workflow pattern:

  1. probe.yml — Instead of commenting directly, it now saves pr-number.txt and
    probe-comment.md as an artifact (probe-pr-comment). Removed the pull-requests:
    write permission since it no longer needs it.
  2. probe-comment.yml (new) — Triggers on workflow_run completion of the
    "Probe" workflow. Since workflow_run always runs in the base repo context, its
    GITHUB_TOKEN has full write permissions. It downloads the artifact and
    posts/updates the comment.

This is the GitHub-recommended pattern for posting PR comments from fork PRs.

@MDA2AV MDA2AV linked an issue Feb 16, 2026 that may be closed by this pull request
@MDA2AV MDA2AV merged commit 3a907b2 into main Feb 16, 2026
1 check failed
@MDA2AV MDA2AV deleted the fix/pr-probe-comment branch February 16, 2026 11:41
@MDA2AV MDA2AV restored the fix/pr-probe-comment branch February 16, 2026 12:39
@MDA2AV MDA2AV deleted the fix/pr-probe-comment branch February 16, 2026 12:41
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.

Fix PRs automatic comment

1 participant