#2161·MetaGPT

CI: fulltest and unittest fail for pull requests from forks since actions/checkout's July 20 change

Author: UniteAndCreateForLifeCreated Sep 27, 2026Updated Sep 27, 2026

Bug description Since 2026-07-20, actions/checkout refuses to check out a fork pull request's code in a pull_request_target workflow unless the step opts in (changelog). fulltest.yaml (line 25) and unittest.yaml (line 22) check out github.event.pull_request.head.sha under pull_request_target, so both now fail at the checkout step for pull requests from forks. Same-repository pull requests still pass, so this is easy to miss.

Separately, from 2026-11-02 GitHub blocks pull_request_target by default on public repositories that have no Actions policy allowing it (changelog), so after that date these workflows stop running for every pull request.

Bug solved method Two ways out:

  1. Run these tests on pull_request. Fork pull requests get no secrets there, so tests that need API keys would run on pushes or a maintainer-triggered run instead.
  2. If fork pull requests must run the secret-dependent tests, gate them behind a maintainer's approval (an environment with required reviewers). Adding allow-unsafe-pr-checkout: true would run fork code with the workflow's secrets.

I can open a PR for option 1 if that helps.

Environment information

  • LLM type and model name: n/a (CI workflow)
  • System version: GitHub Actions
  • Python version: 3.9 (the failing build (3.9) job)
  • MetaGPT version or branch: main
  • packages version: actions/checkout@v4
  • installation method: n/a

Screenshots or logs https://github.com/FoundationAgents/MetaGPT/actions/runs/36004134730 (a fork pull request; failed at "Run actions/checkout@v4")

Found with prt-check, a free checker (https://github.com/UniteAndCreateForLife/prt-check). Drafted with AI assistance (Claude); the facts and links were checked against their sources before posting.

Source: FoundationAgents/MetaGPT