Skip to content

Post conformance PR comment via workflow_run#86

Merged
rgbkrk merged 1 commit into
mainfrom
ci-comment-via-workflow-run
Apr 11, 2026
Merged

Post conformance PR comment via workflow_run#86
rgbkrk merged 1 commit into
mainfrom
ci-comment-via-workflow-run

Conversation

@rgbkrk
Copy link
Copy Markdown
Member

@rgbkrk rgbkrk commented Apr 11, 2026

Summary

  • Fork PRs receive a read-only GITHUB_TOKEN regardless of the top-level permissions block, so the inline gh pr comment step in conformance.yml fails with Resource not accessible by integration (addComment) whenever a contributor opens a PR from a fork (e.g. Removed xeus-cling from tested kernels (not maintained anymore) #84).
  • Move commenting into a separate comment-on-pr.yml workflow triggered by workflow_run, which runs in the base-repo context with pull-requests: write and only reads the uploaded summary artifact — it never checks out PR code.
  • conformance.yml now writes pr_number.txt and uploads summary.md + the PR number as a pr-comment artifact when the event is a PR.

Caveat

workflow_run only reads workflow files from the default branch, so the comment workflow won't fire for this PR itself — it'll start working on PRs opened after this lands on main.

Test plan

  • Merge to main
  • Have a fork-based PR opened (or re-push Removed xeus-cling from tested kernels (not maintained anymore) #84) and confirm the conformance summary comment is posted by the Comment PR with Conformance Results workflow
  • Confirm the Kernel Conformance workflow still posts the step summary and uploads the conformance-reports artifact

Fork PRs receive a read-only GITHUB_TOKEN regardless of the top-level
permissions block, so the inline `gh pr comment` step in the conformance
workflow fails with "Resource not accessible by integration" whenever a
contributor opens a PR from a fork. Move the comment step into a
separate workflow triggered by workflow_run, which runs in the base
repo context with pull-requests: write and only reads the uploaded
summary artifact — never checks out PR code.
@rgbkrk rgbkrk merged commit eef158e into main Apr 11, 2026
20 checks passed
@rgbkrk rgbkrk deleted the ci-comment-via-workflow-run branch April 11, 2026 15:20
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