Skip to content

ci: add PR status labels - #971

Open
yaythomas wants to merge 1 commit into
mainfrom
ci/pr-status-labels
Open

yaythomas wants to merge 1 commit into
mainfrom
ci/pr-status-labels

Conversation

@yaythomas

@yaythomas yaythomas commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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 adds needs-review to a new pull request whose author has no write access. When the author pushes, or the pull request is marked ready for review, it replaces changes-requested with needs-review. The job checks out no pull request code, and its token has only contents: read and pull-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

  • Design note: CI #88: add PR status labels workflow and pr-status-labels.md, which describes the behavior.
  • Simpler options considered: none, because this repository gains no logic, only a caller and its test.
  • Net change: +17 lines of workflow configuration and a 55-line test. No public API change.

Assumptions

  • The new workflow first runs after this merges, because pull_request_target runs in the context of the default branch (GitHub docs).
  • pull-requests: write is 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

Testing

actionlint passes on the changed workflow files. test_pr_status_labels_workflow.py adds 5 tests, which the test-scripts job 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.

@yaythomas
yaythomas deployed to ai-pr-review-runtime November 19, 2026 22:29 — with GitHub Actions Active
@yaythomas
yaythomas deployed to ai-pr-review-runtime November 19, 2026 22:30 — with GitHub Actions Active
Comment thread .github/workflows/pr-status-labels.yml Resolved
@github-actions

This comment has been minimized.

@yaythomas
yaythomas deployed to ai-pr-review-runtime November 19, 2026 22:54 — with GitHub Actions Active
Comment thread .github/workflows/test-parser.yml Resolved
@github-actions

This comment has been minimized.

@github-actions

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 yaythomas changed the title ci: add PR status labels and bump issue triage ci: add PR status labels Nov 23, 2026
@yaythomas
yaythomas deployed to ai-pr-review-runtime November 23, 2026 18:13 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No 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 c175e5f64fa49f7cc254a18709b5760cccb7d815. Workflow run

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — c175e5f6 Deployed Nov 23, 2026 by yaythomas via ai-pr-review / Codex review / Generate Codex review #3352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants