Skip to content

safe-outputs: target="triggering" rejects pull_request_target PR context #20168

@strawgate

Description

@strawgate

Summary

safe-outputs operations using target: \"triggering\" can incorrectly fail in pull_request_target runs with:

Target is \"triggering\" but not running in pull request context

Repro

Expected

pull_request_target should be treated as PR context for target: \"triggering\" resolution, same as pull_request.

Actual

Resolver rejects the context and skips/fails the message as not in PR context.

Suspected cause

actions/setup/js/safe_output_helpers.cjs PR-context detection for resolveTarget() includes:

  • pull_request
  • pull_request_review
  • pull_request_review_comment

but excludes pull_request_target.

Proposed fix

Include pull_request_target in PR-context detection in resolveTarget() and add regression tests in safe_output_helpers.test.cjs.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions