Skip to content

ci: skip test-reporter on fork PRs; explain in annotation#240

Merged
gmarzot merged 1 commit intomainfrom
devops/fork-pr-reporter-guard
Apr 22, 2026
Merged

ci: skip test-reporter on fork PRs; explain in annotation#240
gmarzot merged 1 commit intomainfrom
devops/fork-pr-reporter-guard

Conversation

@gmarzot
Copy link
Copy Markdown
Contributor

@gmarzot gmarzot commented Apr 21, 2026

Summary

Mirror of moxygen #164. `dorny/test-reporter` requires `checks: write` on `GITHUB_TOKEN`; fork-PR tokens are read-only regardless of workflow perms. Guard the reporter step to skip on cross-repo PRs; add a notice annotation explaining the skip.

Effect

  • Same-repo PRs / sync PRs / main pushes: no change.
  • Fork PRs: reporter step shows Skipped with a ::notice:: annotation; test-log output above remains authoritative. Job goes green when tests pass.

Test plan

  • CI green on this PR (internal — reporter still runs)
  • After merge: next fork PR (if any) runs clean with notice visible and green overall

This change is Reviewable

Mirrors moxygen PR #164. dorny/test-reporter writes a GitHub Check
Run, which requires 'checks: write' on GITHUB_TOKEN. Fork-PR tokens
are read-only by GitHub security policy regardless of workflow
permissions — so the step always fails on cross-repo PRs.

Guard the step on same-repo pull_request events. Add a sibling notice
step that explains the skip on fork PRs. test-log output remains
authoritative for pass/fail.
Copy link
Copy Markdown

@peterchave peterchave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@peterchave reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on afrind, akash-a-n, michalhosna, mondain, Oxyd, suhasHere, and TimEvens).

@gmarzot gmarzot self-assigned this Apr 22, 2026
@gmarzot gmarzot merged commit 0beeda4 into main Apr 22, 2026
6 checks passed
@gmarzot gmarzot deleted the devops/fork-pr-reporter-guard branch April 22, 2026 17:21
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