Skip to content

master-202510150228

@oberstet oberstet tagged this 15 Oct 02:09
This implements a hybrid trigger approach to enable PR comment posting
for both fork and non-fork PRs:

- For non-fork PRs: workflow_run trigger works as before (elegant, no polling)
- For fork PRs: pull_request_target trigger with polling (new capability)

GitHub's workflow_run trigger does not fire for fork PRs due to security
restrictions. This change adds pull_request_target as a fallback trigger
that polls/waits for the release workflow to complete.

Changes:
1. Added pull_request_target trigger for opened/synchronize events
2. Added wait-for-release job that polls for release completion (60 min timeout)
3. Updated check-release-exists job to handle both trigger types
4. Updated find-wstest JavaScript to use optional chaining for context
5. Updated workflow_run_url construction to handle both trigger contexts

The polling approach mirrors the old implementation (commit 1c989ee2) but
is now used ONLY for fork PRs, while non-fork PRs continue to use the
more efficient workflow_run trigger without polling.
Assets 2
Loading