[PR #3872] [MERGED] PR labels: a kind from the template's ticked box, areas from the paths #5262

Closed
opened 2026-11-03 05:11:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3872
Author: @ludovic111
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @ludovic111

Base: main ← Head: feat/kind-labels


📝 Commits (1)

  • 59b1c33 PR labels: a kind from the template's ticked box, areas from the paths

📊 Changes

5 files changed (+435 additions, -2 deletions)

View changed files

📝 .github/pull_request_template.md (+12 -0)
➕ .github/workflows/pr-labels.yml (+36 -0)
📝 CONTRIBUTING.md (+6 -2)
➕ tests/test_pr_labels.py (+138 -0)
➕ tools/ci/pr_labels.py (+243 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What and why

Step 3 of #3859: labels that say what a pull request is, so label:parity is the list of real progress toward
vanilla, apart from split screen, HDR and other extras.

  • Template: a "Kind" list with one box to tick: parity, bug, perf, feature, extra, tooling, docs.
  • pr-labels.yml sets the label of the ticked box (docs → the existing documentation label):
    • only when the pull request has no kind label yet; several boxes ticked → nothing;
    • when the author changes the tick, the old kind's label is swapped for the new one, only if it was the one their
      old tick set and the only kind on it: a label someone set by hand is never removed;
    • feature keeps its release meaning (under "New", minor bump: docs/release-flow.md); skip-release,
      release-now are untouched.
  • Area labels from the changed paths (docs/architecture.md): launcher, mods, worldgen, mobs,
    rendering, server, multiplayer, saves, commands, audio, chunks, blocks, ui, website
    (what playhorizon.dev reads). At most 3, each with a tenth of the changed lines or more; added on open/push, never
    removed. Probes, harnesses, game.rs and other shared files map to no area.
  • tools/ci/pr_labels.py create|backfill made the labels and labelled the open pull requests once (below).

.github/ change, explained

New .github/workflows/pr-labels.yml on pull_request_target (needed so fork PRs get labels too; their own
pull_request token is read-only):

  • Runs main's file; checks out main's tools/ci/pr_labels.py only (ref: main, sparse, persist-credentials: false),
    never the pull request's head or merge commit.
  • The script reads the event JSON (the description is data, never in a shell line) and the API's changed-file list;
    nothing of the pull request is built, run or imported.
  • Token: contents: read, pull-requests: write (labels). Title-only edits skip before a runner starts.
  • tests/test_pr_labels.py checks those properties of the file, and that the template has every kind unticked.

Done once already (by this agent, with Ludovic's account)

  • Created 17 labels: parity perf extra tooling (kinds; bug, feature, documentation existed) and the 14 areas
    except launcher (existed).
  • Labelled 180 of 198 open pull requests: areas from the paths (156 got one), and a kind on 105, where it is
    clear from the title and files (ticked box, docs-only, tooling-only, or the agent's reading of the title: 65
    parity, 17 extra, 9 tooling, 7 perf, 3 feature, 2 bug, 2 documentation; PRs that already had a kind kept it). Mod API/SDK pull requests got no kind: that's for the modding lead. Wrong
    one? /unlabel (trusted reviewers) or any maintainer fixes it; the workflow won't put it back.

Vanilla reference

None (tooling).

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 668419b92, 1 min 56 s)

Check Result
Scope ✅ 5 files, +435 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 438 passed (1 min 56 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 1 affected, to run in CI (--quick): lan_integration
Label skip-release

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3872 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/kind-labels` --- ### 📝 Commits (1) - [`59b1c33`](https://github.com/horizon-rust/horizon/commit/59b1c33bb2810d7f5b6120eb89feb79dbe1626bd) PR labels: a kind from the template's ticked box, areas from the paths ### 📊 Changes **5 files changed** (+435 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/pull_request_template.md` (+12 -0) ➕ `.github/workflows/pr-labels.yml` (+36 -0) 📝 `CONTRIBUTING.md` (+6 -2) ➕ `tests/test_pr_labels.py` (+138 -0) ➕ `tools/ci/pr_labels.py` (+243 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What and why Step 3 of #3859: **labels that say what a pull request is**, so `label:parity` is the list of real progress toward vanilla, apart from split screen, HDR and other extras. - **Template:** a "Kind" list with one box to tick: `parity`, `bug`, `perf`, `feature`, `extra`, `tooling`, `docs`. - **`pr-labels.yml`** sets the label of the ticked box (`docs` → the existing `documentation` label): - only when the pull request has no kind label yet; several boxes ticked → nothing; - when the author changes the tick, the old kind's label is swapped for the new one, only if it was the one their old tick set and the only kind on it: **a label someone set by hand is never removed**; - `feature` keeps its release meaning (under "New", minor bump: docs/release-flow.md); `skip-release`, `release-now` are untouched. - **Area labels** from the changed paths (docs/architecture.md): `launcher`, `mods`, `worldgen`, `mobs`, `rendering`, `server`, `multiplayer`, `saves`, `commands`, `audio`, `chunks`, `blocks`, `ui`, `website` (what playhorizon.dev reads). At most 3, each with a tenth of the changed lines or more; added on open/push, never removed. Probes, harnesses, `game.rs` and other shared files map to no area. - `tools/ci/pr_labels.py create|backfill` made the labels and labelled the open pull requests once (below). ### `.github/` change, explained New `.github/workflows/pr-labels.yml` on `pull_request_target` (needed so fork PRs get labels too; their own `pull_request` token is read-only): - Runs main's file; checks out **main's `tools/ci/pr_labels.py` only** (`ref: main`, sparse, `persist-credentials: false`), never the pull request's head or merge commit. - The script reads the event JSON (the description is data, never in a shell line) and the API's changed-file list; nothing of the pull request is built, run or imported. - Token: `contents: read`, `pull-requests: write` (labels). Title-only edits skip before a runner starts. - `tests/test_pr_labels.py` checks those properties of the file, and that the template has every kind unticked. ### Done once already (by this agent, with Ludovic's account) - Created 17 labels: `parity perf extra tooling` (kinds; `bug`, `feature`, `documentation` existed) and the 14 areas except `launcher` (existed). - Labelled **180 of 198** open pull requests: areas from the paths (156 got one), and a kind on **105**, where it is clear from the title and files (ticked box, docs-only, tooling-only, or the agent's reading of the title: 65 `parity`, 17 `extra`, 9 `tooling`, 7 `perf`, 3 `feature`, 2 `bug`, 2 `documentation`; PRs that already had a kind kept it). Mod API/SDK pull requests got no kind: that's for the modding lead. Wrong one? `/unlabel` (trusted reviewers) or any maintainer fixes it; the workflow won't put it back. ## Vanilla reference None (tooling). ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 668419b92, 1 min 56 s) | Check | Result | | --- | --- | | Scope | ✅ 5 files, +435 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 438 passed (1 min 56 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 1 affected, to run in CI (--quick): lan_integration | | Label | `skip-release` | ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:21 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5262
No description provided.