-
Notifications
You must be signed in to change notification settings - Fork 295
Closed
Labels
Description
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
- Trigger workflow on
pull_request_target(e.g. synchronize). - Use reusable
gh-awworkflow with a PR-scoped safe output (example:update-pull-requestwith defaulttarget: \"triggering\"). - Observe warning/error in safe outputs job:
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_requestpull_request_reviewpull_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.
Reactions are currently unavailable