Skip to content

Add issue triager: auto-label and auto-assign new issues#597

Draft
huzaifa-d wants to merge 4 commits into
mainfrom
user/modanish/Triager
Draft

Add issue triager: auto-label and auto-assign new issues#597
huzaifa-d wants to merge 4 commits into
mainfrom
user/modanish/Triager

Conversation

@huzaifa-d

@huzaifa-d huzaifa-d commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an issue-triage GitHub Action and consolidates overlapping label logic out of the policy service into it, so triage labeling + assignment has a single owner.

New: issue-triage Action

On issue opened / edited / assigned:

  1. Auto-labels via github/issue-labeler@v3.4 using regex on title + body → OS-*, Container-*, Area-*. Patterns derived from previously triaged issues. Each label uses a single OR-alternation regex (the action ANDs multiple list entries).
  2. Auto-assigns area owners via actions/github-script@v7 (keyword match on title + body).
  3. Removes Needs-Triage once auto-triaged — an area label was applied or an owner is assigned.
File Purpose
.github/labeler.yml Regex → label config
.github/workflows/Issue.Labeler.yml Labeler + assignment + Needs-Triage removal

Assignee mapping

Area keywords Owner
network, firewall, iptables, proxy, dns, tcp/udp, ipv4/6 @bbonaby
linux, wslc, wsl, lxc, bubblewrap @SohamDas2021
appcontainer, base container, process isolation/container @jsidewhite
microvm, nanvix, hyperlight, windows sandbox @huzaifa-d
session isolation @adpa-ms
macos, darwin, seatbelt, xcode @richiemsft

Policy service consolidation

To avoid two systems doing overlapping triage, the following moved from .github/policies/ into the Action:

  • Removed the OS-Linux/MacOS/Windows rules from labelManagement.issueOpened.yml — the Action's regex applies OS-* across all issue types, not just Bug reports.
  • Deleted labelManagement.issueAssigned.yml — its only task removed Needs-Triage on assign. The Action now triggers on assigned and clears Needs-Triage there, preserving the behavior for manual assignments too.

The policy service keeps all unrelated behavior: adding Needs-Triage on open, Issue-* type labels, close cleanup, the author-feedback flow, and PR labelSync.

Design notes

  • sync-labels: 0 — labels are only added, never removed, so human triage decisions are preserved.
  • Issue-* type labels stay with the templates/policy (out of scope here).
  • No self-trigger loop: GITHUB_TOKEN actions cannot recursively trigger workflows, so the Action's own addAssignees/label changes don't re-run it; only human events do.
  • The regex config and assignment logic were adversarially reviewed by two independent cross-family models (GPT-5.5 and Gemini 3.1 Pro), which caught and fixed an AND-vs-OR semantics bug in the initial labeler config.

cc @SohamDas2021 (original author of the .github/policies/ label management) for review of the consolidation.

Adds a GitHub Actions workflow that assists issue triage on new/edited
issues:

- .github/labeler.yml: regex config for github/issue-labeler@v3.4 that
  applies OS-*, Container-*, and Area-* labels based on issue title+body.
  Patterns derived from previously triaged issues. Each label uses a
  single OR-alternation regex (the action ANDs multiple list entries).
  sync-labels: 0 means labels are only added, never removed, so human
  triage decisions are preserved. Issue-type labels are left to the
  issue templates.

- .github/workflows/Issue.Labeler.yml: runs the labeler, then an
  actions/github-script step that auto-assigns area owners by keyword
  while preserving existing assignees.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 18:44
@huzaifa-d huzaifa-d requested a review from a team as a code owner July 1, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an issue-triage GitHub Actions workflow to automatically apply area/OS/backend labels (via github/issue-labeler) and auto-assign likely area owners (via actions/github-script) when issues are opened or edited.

Changes:

  • Introduces .github/workflows/Issue.Labeler.yml to label and assign issues on opened / edited.
  • Adds .github/labeler.yml containing regex→label mappings for OS/Container/Area labels.
Show a summary per file
File Description
.github/workflows/Issue.Labeler.yml New workflow that runs labeler + owner auto-assignment on issue events.
.github/labeler.yml New regex configuration mapping issue title/body matches to OS/Container/Area labels.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Low
Comment thread .github/labeler.yml Outdated
Comment thread .github/labeler.yml Outdated
Comment thread .github/labeler.yml Outdated
Comment thread .github/workflows/Issue.Labeler.yml Outdated
huzaifa-d and others added 2 commits July 1, 2026 11:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The assignment step now re-fetches the issue's labels (to observe what the
labeler step applied) and removes Needs-Triage when the issue has an
OS-*/Container-*/Area-* label or an assigned owner. A 404 on removal (label
already gone via a concurrent run) is ignored.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@huzaifa-d huzaifa-d requested a review from SohamDas2021 July 1, 2026 19:38
Move the OS-* labeling and Needs-Triage-on-assign behavior out of the
policy service and into the issue-labeler GitHub Action so triage has a
single owner:

- Remove the OS-Linux/MacOS/Windows rules from
  labelManagement.issueOpened.yml. The workflow's regex already applies
  OS-* labels across all issue types (not just Bug reports).
- Delete labelManagement.issueAssigned.yml. Its only task removed
  Needs-Triage on assignment; the workflow now triggers on 'assigned'
  and clears Needs-Triage there, preserving that behavior for manual
  assignments too.

The policy service keeps unrelated behavior: adding Needs-Triage on open,
Issue-* type labels, close cleanup, author-feedback flow, and PR labelSync.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sync-labels: 0
repo-token: ${{ github.token }}

- name: Assign owners and clear Needs-Triage

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.

issue: can we see if we can create teams and then assign items to the teams instead of single users. We can create a team for each backend, and then one for MXC core (which would be things for SDK functionality, infrastructure and non backend specific MXC things).

@huzaifa-d huzaifa-d marked this pull request as draft July 1, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants