Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
yaythomas
force-pushed
the
ci/pr-status-labels
branch
from
November 19, 2026 22:53
5d94f85 to
eb835ba
Compare
This comment has been minimized.
This comment has been minimized.
yaythomas
force-pushed
the
ci/pr-status-labels
branch
from
November 20, 2026 23:18
eb835ba to
a7bfedc
Compare
This comment has been minimized.
This comment has been minimized.
Add the shared PR status labels workflow from CI v0.7.0. It adds needs-review to a new pull request whose author has no write access, and replaces changes-requested with needs-review when the author pushes or the pull request is marked ready for review. A contract test checks the caller's events, pin, permissions and secrets, and the test-scripts job runs it.
yaythomas
force-pushed
the
ci/pr-status-labels
branch
from
November 23, 2026 18:12
a7bfedc to
c175e5f
Compare
Contributor
Codex AI reviewNo actionable findings after checking CONTRIBUTING rules 1–9. Both prior findings are resolved. Tests were not executed during this read-only review; the contract tests do not exercise live GitHub label writes. Reviewed commit |
hln33
approved these changes
Nov 23, 2026
This branch was successfully deployed
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.
Description of changes
Adds the shared PR status labels workflow from CI #88: add PR status labels workflow, pinned to CI v0.7.0 (commit
c28fdc7). It addsneeds-reviewto a new pull request whose author has no write access. When the author pushes, or the pull request is marked ready for review, it replaceschanges-requestedwithneeds-review. The job checks out no pull request code, and its token has onlycontents: readandpull-requests: write. A contract test checks the caller's events, pin, permissions and secrets, as the closed-issue-comment test does.Issue triage is not changed here, because Python #982: bump the GitHub Actions dependencies already moved it to v0.7.0.
Design
Assumptions
pull_request_targetruns in the context of the default branch (GitHub docs).pull-requests: writeis enough to add and remove a pull request's labels (GitHub App permissions). The label writes are unverified in a run. Since Java #899: add PR status labels and bump issue triage merged, the workflow has run on 2 Java pull requests, but both authors have write access, so it added no label. A dry run with writes disabled checked its decisions against every open pull request in the consuming repositories.Decisions not covered by the issue or the design note
ubuntu-latest, as closed-issue-comment does, because it runs no model.test-scriptsjob runs a fixed list of test files, so the new test file is added to that list. Python #977: test-scripts skips two test files, and one of them fails covers the two older test files the list leaves out.Testing
actionlint passes on the changed workflow files.
test_pr_status_labels_workflow.pyadds 5 tests, which thetest-scriptsjob runs. Each one fails when the property it checks is broken. The labeling logic has 36 unit tests in the CI repository.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.