Repository navigation
ci: define the labels as code and triage pull requests by them #1426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
07d6b5f
ci: define the labels as code and triage pull requests by them
TarikGul 25080a9
Merge remote-tracking branch 'origin/main' into tg/label-system
TarikGul 569aa9a
ci: match the labels to the agreed families
TarikGul 10e87a1
ci: merge labels the cheap way and label issues only on merge
TarikGul 51e5c68
Merge branch 'main' into tg/label-system
TarikGul c861e22
Merge remote-tracking branch 'origin/main' into tg/label-system
TarikGul 7528646
docs(agents): add a labels skill and point AGENTS.md at it
TarikGul fd0c4d2
Merge remote-tracking branch 'origin/main' into tg/label-system
TarikGul 7b98b78
chore: drop a committed Python bytecode cache and ignore __pycache__
TarikGul 26013b3
Merge remote-tracking branch 'origin/main' into tg/label-system
TarikGul 3019ebb
ci(labels): read areas from the merge commit and address review
TarikGul 791367a
ci(labels): keep status and the gate correct across cancelled and que…
TarikGul e481df7
Merge remote-tracking branch 'origin/main' into tg/label-system
TarikGul a18d1e1
Merge branch 'main' into tg/label-system
TarikGul 7294af9
chore(labels): keep needs and status labels out of CI
TarikGul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| name: labels | ||
| description: Label pull requests and issues in this repository, and add, rename or retire a label. Use when opening a pull request, filing an issue, asking for an app build, marking work as blocked, triaging, or when a task mentions a label. Labels are defined as code in .github/labels.yml, so a label is never created by hand. | ||
| --- | ||
|
|
||
| # Labels | ||
|
|
||
| [docs/labels.md](../../../docs/labels.md) owns the system: every family, what each label means, and what is automatic. Read it for anything this file does not answer. | ||
|
|
||
| ## Opening a pull request | ||
|
|
||
| - Do not add `area:` or `size:` labels. A pull request carries no area, and `pr-triage.yml` sets the size from the lines changed. | ||
| - Do not set `status:waiting-on-review`; `pr-triage.yml` sets it whenever a pull request that is not a draft has no status. | ||
| - Add a `ci:` label only to get what it runs, and only when the change needs it: `ci:ios-simulator` or `ci:ios-device` for the iOS app, `ci:android-device` for an APK, `ci:android-emulator-tests`, `ci:host-playground-e2e`. Each one starts macOS or emulator jobs on every later push, so do not add them by default. | ||
| - Add `ci:no-changeset` only when the change ships nothing, as docs/RELEASE_PROCESS.md describes. | ||
| - To label the issue the pull request finishes, write `Closes #N` in the body. The issue gets its `area:` labels when the pull request merges. | ||
|
|
||
| ## While it is open | ||
|
|
||
| - Keep one `status:` label, named for who acts next: `status:waiting-on-author` after requesting changes, `status:ready-to-merge` once approved, `status:blocked` when something else has to land first, with a comment saying what. | ||
| - Add a `needs:` label when work is blocked on something other than code: `needs:spec`, `needs:decision` or `needs:UI`. Remove it once resolved. | ||
|
|
||
| ## Filing an issue | ||
|
|
||
| - Add `area:` labels for what it touches, and a `spa:` label when a product needs it. | ||
| - Type, status, priority and target date are issue fields, not labels. | ||
|
|
||
| ## Adding, renaming or retiring a label | ||
|
|
||
| - Never create, rename or delete a label with `gh label` or the web UI. Edit `.github/labels.yml` in a pull request; `scripts/sync-labels.py` applies it when the pull request merges. | ||
| - Name it `family:value`, lowercase with hyphens, in an existing family. Give it a color, a description saying when to use it, a `target` and an `addedBy`. | ||
| - To rename, put the old name under `previously`; the label stays on everything that carries it. To delete, move it under `retired` with a reason. A label whose replacement is not decided goes under `pending`. | ||
| - If a workflow, script, template or doc names the label, change it in the same pull request, so the label and its users land together. `rg` for the old name across `.github`, `scripts`, `.claude` and the docs. | ||
| - Run `python3 scripts/sync-labels.py` to see the plan against the live labels. It only reads. Never pass `--apply`; the push to main does that. | ||
| - `diagnosis-report` keeps its name: deployed copies of the playground open issues with it. |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Which paths belong to which area. issue-areas.yml reads this to label the | ||
| # issues a pull request closes; new pull requests carry no area themselves. Every | ||
| # label here is defined in .github/labels.yml. | ||
| # | ||
| # The same paths decide who is asked to review in .github/CODEOWNERS. The two | ||
| # files are different formats, so scripts/check-path-routing.py holds them to the | ||
| # same set of roots and CI runs it. Change one and the check tells you about the | ||
| # other. | ||
| # | ||
| # Globs: `**` matches across directories, `*` within one. A glob with no slash, | ||
| # like `*.md`, matches at the repository root only. A glob starting with `!` takes | ||
| # the paths it matches out of that area. | ||
| # | ||
| # Keep it flat: a quoted label, then one quoted glob per line. issue-areas.yml | ||
| # reads it without a YAML parser. | ||
|
|
||
| "area:rfc": | ||
| - "docs/rfcs/**" | ||
|
|
||
| "area:docs": | ||
| - "docs/**" | ||
| - "*.md" | ||
| - "!docs/rfcs/**" | ||
|
|
||
| "area:ci": | ||
| - ".github/workflows/**" | ||
| - ".github/actions/**" | ||
|
|
||
| "area:js": | ||
| - "js/**" | ||
| - "playground/**" | ||
| - "explorer/**" | ||
|
|
||
| # The core reaches every host at once, so a change here is the most expensive | ||
| # one to get wrong. | ||
| "area:core": | ||
| - "rust/crates/**" | ||
|
|
||
| # The hosts are apart rather than together. An iOS-only change and an | ||
| # Android-only change are reviewed by different people and break differently. | ||
| "area:ios": | ||
| - "hosts/ios/**" | ||
| - "ios/**" | ||
|
|
||
| "area:android": | ||
| - "hosts/android/**" | ||
| - "android/**" | ||
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.