HDDS-13777. Change label-pr workflow to avoid pull_request_target#9808
Open
adoroszlai wants to merge 1 commit intoapache:masterfrom
Open
HDDS-13777. Change label-pr workflow to avoid pull_request_target#9808adoroszlai wants to merge 1 commit intoapache:masterfrom
adoroszlai wants to merge 1 commit intoapache:masterfrom
Conversation
errose28
approved these changes
Feb 23, 2026
Contributor
errose28
left a comment
There was a problem hiding this comment.
Thanks for the improvement @adoroszlai.
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.
What changes were proposed in this pull request?
Currently the
pull-request-labelerworkflow is executed onpull_request_target, which is allowed for any user. Other PR workflows are triggered bypull_request, and need to be manually approved by a committer for PRs opened by non-committers. Such PRs may show "all checks passed" (green checkmark) even if onlylabel-prhas been executed, other workflows are pending. This is confusing and we have seen some PRs being merged without regular CI checks due to this.This PR changes the
pull-request-labelerworkflow (renamed tolabel-pull-requests) to run onscheduleinstead ofpull_request_target. It can also be started manually (by committers) for easier testing.It replaces
actions/labelerwith GitHub CLI for adding labels. The action expects inputpr-numberone item per line, which I couldn't achieve with eitherGITHUB_OUTPUTorGITHUB_ENV.https://issues.apache.org/jira/browse/HDDS-13777
How was this patch tested?
Tested in my fork with two pull requests (targeted at
master, so temporarily added a matrix item formaster):Only manual triggering was tested, scheduled runs were not triggered for some reason (does not seem to be a unique problem, see https://github.com/orgs/community/discussions/185828).Scheduled update of
zduPRs:https://github.com/adoroszlai/ozone/actions/runs/22305349041/job/64523042231#step:3:10