damccorm opened a new pull request, #41917: URL: https://github.com/apache/beam/pull/41917
### Summary GitHub and ASF Infra now block `pull_request_target` on public ASF repositories (see https://infra.apache.org/github-actions-policy.html), causing `LabelPrs` and `pr-bot-pr-updates` to fail immediately with `startup_failure` on every PR event since December 2, 2026. This PR migrates both `.github/workflows/label_prs.yml` and `.github/workflows/pr-bot-pr-updates.yml` to a hybrid **`pull_request` signal -> `workflow_run` + 15-minute `schedule` catch-up** architecture (leaving `gemini_code_review.yml` separate to avoid conflicting with #41860): 1. **Unprivileged signal workflow (`.github/workflows/pr_signal.yml`):** - Triggers on `pull_request` (`opened`, `synchronize`, `reopened`, `converted_to_draft`, `ready_for_review`, `review_requested`) with `permissions: {}` and no checkout or artifacts. - Immediately triggers privileged `workflow_run` jobs on `master` for committer and approved fork PRs. 2. **Labeling workflow (`.github/workflows/label_prs.yml`):** - Triggers on `workflow_run` (`PR Signal`), `schedule` (`*/15 * * * *` catch-up sweep for unapproved fork PRs / missing `size/*` labels), and `workflow_dispatch` (optional `pr_number`). - Resolves target PRs safely from `github.event.workflow_run.head_sha` (checking recently updated open PRs first to avoid search-index lag, with Search API fallback) and passes `pr-number` to `actions/labeler@v4`. - Replaces `codelytv/[email protected]` (which does not support `workflow_run`/`schedule` or `pr-number`, and was unpinned) with an `actions/github-script@v9` step implementing the same thresholds (`size/xs`..`size/xl`, `ignore_file_deletions: true`). 3. **PR Bot update workflow (`.github/workflows/pr-bot-pr-updates.yml` + `scripts/ci/pr-bot/`):** - Preserves `issue_comment` handling directly and replaces `pull_request_target` with `workflow_run` (`PR Signal`), staggered 15-minute `schedule` (`5,20,35,50 * * * *`), and `workflow_dispatch`. - Reconciles `synchronize` (`head.sha` change), `convert_to_draft`, `ready_for_review`, and `review_requested` via GitHub's `issues.listEvents` + PR API and persisted tracking fields (`lastProcessedEventId`, `lastHeadSha`, `lastActionAt`) on `Pr` without relying on untrusted PR artifacts. - Preserves shared concurrency group (`pr-bot-labels-*`) between `LabelPrs` and `pr-bot-pr-updates`. ### Verification - Validated YAML syntax of `pr_signal.yml`, `label_prs.yml`, and `pr-bot-pr-updates.yml` and Node 24 JS syntax of inline `actions/github-script` blocks. - Ran `npm run format`, `npm run build`, and `npm test` in `scripts/ci/pr-bot` under `node:24` — all 45 unit tests pass (including 13 new tests covering `Pr` tracking fields and `reconcilePullUpdate` transitions, idempotency, event ordering after comments, and pagination). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
