Skip to content

ci: label pull requests by ownership area - #289

Merged
tt-a1i merged 1 commit into
mainfrom
codex/add-pr-labeler
Aug 29, 2026
Merged

ci: label pull requests by ownership area#289
tt-a1i merged 1 commit into
mainfrom
codex/add-pr-labeler

Conversation

@junwu168

Copy link
Copy Markdown
Collaborator

Problem

Pull requests are not consistently classified by the OpenPI area they change. Maintainers must inspect each diff before they can filter, route, or summarize work by ownership boundary.

Value

Automatic, deterministic area labels make the PR queue easier to scan and filter without adding a third-party service or asking contributors to classify their own changes.

Approach

  • Add the official GitHub Pull Request Labeler, pinned to the reviewed v7.0.0 commit.
  • Classify stable OpenPI ownership boundaries: workflows, subagents, background terminals, setup, UI, GitHub infrastructure, and documentation.
  • Run on pull_request_target so fork PRs can receive labels, while reading only base-branch configuration and never checking out or executing contributor code.
  • Grant only contents: read and pull-requests: write to the labeling job.
  • Synchronize configured labels when a PR's changed-file set changes.
  • Add repository tests that pin the action contract, permissions, security boundary, and label taxonomy.

Validation

  • node --test tests/github/automation-workflows.test.ts — 6 passed.
  • ./node_modules/.bin/biome format . — passed.
  • ./node_modules/.bin/biome lint . --error-on-warnings — passed.
  • node_modules/typescript/bin/tsc --noEmit — passed.
  • node scripts/run-tests.mjs — 1,006 passed, 5 failed, 1 skipped. Four existing setup-config process tests exhausted the sandbox's file-watch limit (EMFILE), and one subagent backend test could not create Pi session state under ~/.pi (EPERM).
  • bun run check and bun run test were not run because Bun is unavailable in this environment; the installed underlying check and test commands were run directly as listed above.

Impact

  • User-visible behavior: qualifying pull requests receive one or more area:* labels and Markdown changes receive documentation.
  • Model-visible context/tools: None.
  • Runtime/lifecycle: None; this is repository automation only.
  • Persisted config/data: adds GitHub workflow and label rules; workflow runs update PR label assignments.
  • Compatibility/risk: low. The privileged event has a narrow token and cannot execute pull-request code. Required labels already exist in the repository.

@junwu168 junwu168 added the area:github GitHub workflows, templates, ownership, or tests label Aug 29, 2026
@junwu168
junwu168 marked this pull request as ready for review August 29, 2026 14:05
@junwu168
junwu168 requested review from a team and tt-a1i as code owners August 29, 2026 14:05
@junwu168 junwu168 self-assigned this Aug 29, 2026

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head merge-gate review at e7398b7 against main 6286bd8. The pull_request_target workflow does not checkout or execute PR code, reads configuration from the trusted base commit, pins actions/labeler to a verified commit, grants only contents:read and pull-requests:write, and syncs only configured taxonomy labels. Two independent security reviews found no actionable findings; focused tests and bun run check passed locally, all required CI checks are green, and all configured labels exist.

@tt-a1i
tt-a1i merged commit 25fd64d into main Aug 29, 2026
5 checks passed
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:github GitHub workflows, templates, ownership, or tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants