feat: Issue auto labeling and assigining#12475
Conversation
👋 Hello Parsaabasi, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to automatically label issues (based on issue template detection and keyword matching) and auto-assign issues to maintainers based on applied “Area:” labels.
Changes:
- Introduces a new
issue-auto-labelworkflow triggered onissuesopened/edited. - Applies labels inferred from issue form templates and keyword scanning of title/body.
- Auto-assigns issues to specific maintainers when certain area labels are present.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…signees based on CODEOWNERS. Updated area label mappings and improved error handling for label application. Added functions for parsing CODEOWNERS and matching paths to owners.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@Parsaabasi please resolve any non applicable comment from CoPilot |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
lucasssvaz
left a comment
There was a problem hiding this comment.
@Parsaabasi Here's what still needs to be addressed:
areaLabelToPathstill maps'Area: BT classic'to/libraries/BLE/— it should be/libraries/BluetoothSerial/since we added the CODEOWNERS entry for it.- The workflow re-adds
Status: Awaiting triageandType: Feature requeston everyeditedevent. This will fight with triagers who remove/change those labels. Template-based labels should only be applied onopened, not oneditedorlabeled. - Remove the
# Full label list: .github/ISSUE_TEMPLATE/LABELS.mdreference — that file doesn't exist. 'Area: Libraries': '/libraries/__nocodeowners__/x'points to a non-existent path. Either remove it from the map or add a comment explaining it intentionally resolves to no one.- Some keywords are too generic and will cause false positives:
component,BT(will trigger on BLE issues too),OT,CI,Tools,Performance. Consider using more specific phrases or matching only against template fields like "Related area". - When triggered by
labeled, the workflow re-runs the full keyword scan unnecessarily. It should skip label computation and only run the assignee logic. - Add
concurrency: { group: issue-${{ github.event.issue.number }} }to avoid race conditions on rapid edits. matchesPatternonly handles a few hardcoded glob patterns (*,**/ci.yml,/.*,/*.md) and falls back to prefix matching for everything else. If a more complex pattern is added to CODEOWNERS in the future it will silently resolve to the wrong owners. Consider using a proper glob matching library likeminimatchorpicomatch.
There was a problem hiding this comment.
Release Notes
| Area | Description | Breaking Change | Approved |
|---|---|---|---|
| CI & testing | Added automatic labeling for issues to streamline the organization process. | ❌ | ⏳ |
Description of Change
This will help automate the labeling process and auto assigns the issues to the responsible people according to the areas.