Skip to content

ci: auto-label PRs by changed paths - #67

Merged
loss-and-quick merged 1 commit into
mainfrom
chore/pr-auto-label
Jun 21, 2026
Merged

ci: auto-label PRs by changed paths#67
loss-and-quick merged 1 commit into
mainfrom
chore/pr-auto-label

Conversation

@loss-and-quick

Copy link
Copy Markdown
Owner

Summary

The bug form already labels issues platform:* from its Platform dropdown, but PRs had no auto-labelling. Add actions/labeler (config .github/labeler.yml) on pull_request_target to tag a PR by the files it touches, using the same taxonomy as the PR template's "Affected layer":

  • frontendfrontend/**, package.json, bun.lock, biome.json
  • backendcrates/**, src-tauri/**, Cargo.*
  • platform:linux / platform:windows — the OS-specific src-tauri/src/desktop/* dirs
  • platform:androidmodule/**, crates/kasumi-daemon/**
  • ci.github/**
  • documentation**/*.md

Reuses the existing platform:* labels; adds frontend / backend / ci (created on the repo).

Affected layer

  • frontend/
  • module/
  • scripts/
  • CI / .github/
  • Docs only

Verification

  • actionlint .github/workflows/label-pr.yml clean
  • actions/labeler@v5 pinned by SHA (8558fd74…), matching the repo's SHA-pinning convention
  • frontend / backend / ci labels created on the repo

Note: pull_request_target runs the workflow from the base branch, so this PR won't self-label — it takes effect for PRs opened after merge.

Notes for reviewers

pull_request_target is required for write scope on fork PRs; safe here because labeler only reads the diff's file list + the config from the base branch — it never checks out or runs PR code.

Open follow-up (asked separately): issues can't get the frontend/backend/ci area labels — the bug form only offers a Platform dropdown. Symmetry would need an "Area" dropdown on the form (or leaving area to maintainer triage). Not in this PR.

The bug form labels issues `platform:*`, but PRs had no auto-labelling. Add
actions/labeler (config `.github/labeler.yml`) on `pull_request_target` to tag a PR
by the files it touches: frontend / backend / platform:linux|windows|android / ci /
documentation — the same taxonomy as the PR template's "Affected layer". Reuses the
existing platform:* labels; adds frontend/backend/ci.
@loss-and-quick
loss-and-quick merged commit ed13b03 into main Jun 21, 2026
7 checks passed
@loss-and-quick
loss-and-quick deleted the chore/pr-auto-label branch June 21, 2026 17:20
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.

1 participant