Repository navigation
Conversation
pull_request_target is disabled by ASF infra policy and GitHub is adding a default policy that blocks it. Add pull_request_signal.yml and trigger labeler.yml and fork_ci_status.yml from its workflow_run. Label merged pull requests from the push to main in release_version_labeler.yaml.
Contributor
|
Thank you for working on this |
Contributor
Author
All the credits to Apache Spark community, lets see if it works for us |
This was referenced Oct 23, 2026
Member
|
Nice! Good job :) . World is better with every single |
Member
|
Glad my examples were helpful and useful to replicate :D |
| state: 'open', | ||
| head: `${run.head_repository.owner.login}:${run.head_branch}`, | ||
| }); | ||
| const pr = data.find((pr) => pr.head.sha === run.head_sha); |
Contributor
There was a problem hiding this comment.
A head branch and SHA do not uniquely identify a PR: the same branch can target main and a release branch. pulls.list defaults to newest first, so find() selects the newer PR for every signal and the older PR never receives labels.
The equivalent lookup in fork_ci_status.yml should filter to main before selecting, otherwise it can select the release PR and skip the main notification.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Three workflows use
pull_request_target:labeler.yml,fork_ci_status.ymlandrelease_version_labeler.yaml. ASF infra disables the trigger from November 2026. GitHub also adds a default policy that blocks it on public repositories, enforced from 2026-12-02. Without this change, PRs stop getting labels, theRust (fork)check and the release version label.What changes are included in this PR?
pull_request_signal.yml, an unprivilegedpull_requestworkflow withpermissions: {}and oneechostep.labeler.ymlandfork_ci_status.ymlrun onworkflow_runof that workflow withtypes: [requested]. GitHub runs them from the default branch, so they never run PR code.requestedis sent at once, even for a first-time contributor whose run waits for approval.workflow_run.pull_requestsis empty for fork PRs. Both workflows find the PR fromhead_repository,head_branchandhead_shawithpulls.list, and skip a commit that is no longer the PR head.labeler.ymlpasses the number toactions/labeleraspr-number.workflow_runhead repository and branch, sincegithub.head_refand the PR number are not set.release_version_labeler.yamlruns onpushtomainand labels the merged PR found withlistPullRequestsAssociatedWithCommit.test_fork_ci_status.cjsnow drives the notification with aworkflow_runpayload and covers the stale commit case.What is the testing strategy for this PR?
node --test ci/scripts/test_fork_ci_status.cjspasses (25 tests).actionlintreports nothing on the four workflows.workflow_runflow only takes effect after the merge tomain, because GitHub runs these workflows from the default branch. It is not tested end to end. Things to check after the merge: thatactions/labelerreadslabeler-config.ymlfrom the default branch, that the push-time PR lookup finds merge queue commits without a race onmerged_at, and that a PR from a fork gets labels and theRust (fork)check.Are there any user-facing changes?
No. A PR with merge conflicts does not start
pull_requestworkflows, so it is labeled and gets theRust (fork)check once the conflicts are resolved. Theeditedlabel trigger was dropped, since the old workflow skipped that action already.