Skip to content

CI: pull_request_target lint/test checks out base branch instead of PR head #619

@SergioChan

Description

@SergioChan

Summary

codetests.yml runs on pull_request_target, but each job uses actions/checkout without an explicit PR ref/repository.

On fork-based PRs, this checks out upstream main instead of the PR head commit, so lint/test output can report unrelated failures from main.

Reproduction

  1. Open a PR from a fork.
  2. Trigger test-and-lint (pull_request_target).
  3. In logs, observe checkout resolving to origin/main (base branch), not the PR head SHA.

Observed in: #618

Expected

For pull_request_target, checkout should target the PR head repository + SHA so CI validates the actual PR changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions