DevOps · Flashcard

How does the pull_request_target event differ from pull_request?

  • AIt runs in the base repository context with access to secrets, unlike pull_request which does not
  • BIt runs only after the pull request is merged into the base branch, unlike pull_request which runs on open
  • CIt runs the workflow version from the pull request head branch, unlike pull_request which uses the base
  • DIt targets a specific deployment environment for the pull request, unlike pull_request which is untargeted

Why this is the answer

pull_request_target runs in the base-repo context with secrets and a write token, unlike pull_request (fork context, no secrets). It does not run after merge (that is push), does not use the head branch workflow (it uses base), and is not about environments.

Official docs
Study in Gnoseed →