You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PRs opened from forks (e.g. #617) sit indefinitely with the required unit-tests status check stuck at:
Expected — Waiting for status to be reported
…and never go green, blocking merge regardless of how many runs of Plugin Check succeed.
Root cause
.github/workflows/test.yml declares the unit-tests job with a push-only trigger:
name: UnitTests and CodeCoverageon: [push]jobs:
unit-tests:
runs-on: ubuntu-latest…
GitHub Actions runs on: push workflows from the perspective of the repo where the push lands. For a PR from a fork (apermo:poc/... → lloc:master), the push happens on the fork — so:
The upstream repo (lloc) doesn't run the workflow because no push event hit lloc.
The fork doesn't run the workflow either if Actions are disabled there (which is the default for many forks).
Branch protection on master requires a unit-tests status to be reported on the head commit, and nothing posts one.
Result: the check is "expected" forever and the PR is unmergeable through the normal flow.
Plugin Check (.github/workflows/plugin-check.yml) doesn't have this problem because it triggers on pull_request:, which runs from the upstream repo's perspective with read-only secrets.
Possible directions (decision for the maintainer)
Add pull_request to test.yml's triggers. Smallest fix — workflow runs from upstream on every PR, status reports correctly. Uses the merge-ref so secrets aren't exposed to fork code by default.
on:
push:
pull_request:
Drop the requirement for unit-tests from branch protection on master, leaving Plugin Check (which already covers PRs) as the gate.
Combine the unit-test job into plugin-check.yml (or vice versa) so there's a single gate that runs on both push and pull_request.
pull_request_target if the workflow ever needs write secrets while running against a fork PR — comes with documented security caveats; mentioning for completeness, not recommending blindly.
Option 1 is the lowest-risk change and would unblock contributors immediately; the rest are scope decisions.
Symptom
PRs opened from forks (e.g. #617) sit indefinitely with the required
unit-testsstatus check stuck at:…and never go green, blocking merge regardless of how many runs of
Plugin Checksucceed.Root cause
.github/workflows/test.ymldeclares theunit-testsjob with a push-only trigger:GitHub Actions runs
on: pushworkflows from the perspective of the repo where the push lands. For a PR from a fork (apermo:poc/...→lloc:master), the push happens on the fork — so:lloc) doesn't run the workflow because no push event hitlloc.masterrequires aunit-testsstatus to be reported on the head commit, and nothing posts one.Result: the check is "expected" forever and the PR is unmergeable through the normal flow.
Plugin Check(.github/workflows/plugin-check.yml) doesn't have this problem because it triggers onpull_request:, which runs from the upstream repo's perspective with read-only secrets.Possible directions (decision for the maintainer)
pull_requesttotest.yml's triggers. Smallest fix — workflow runs from upstream on every PR, status reports correctly. Uses the merge-ref so secrets aren't exposed to fork code by default.unit-testsfrom branch protection onmaster, leavingPlugin Check(which already covers PRs) as the gate.plugin-check.yml(or vice versa) so there's a single gate that runs on both push and pull_request.pull_request_targetif the workflow ever needs write secrets while running against a fork PR — comes with documented security caveats; mentioning for completeness, not recommending blindly.Option 1 is the lowest-risk change and would unblock contributors immediately; the rest are scope decisions.
Reproduction
Plugin Check / testrun reported, nounit-tests.gh api repos/lloc/Multisite-Language-Switcher/commits/<sha>/statusreturnsstate: pendingwith an emptystatusesarray.gh api repos/lloc/Multisite-Language-Switcher/commits/<sha>/check-runsshows onlytest(Plugin Check), notunit-tests.Happy to open a follow-up PR for whichever direction you pick.