Auto Label Issues

GitHub Actions workflow that reads issue content and automatically applies relevant labels based on keyword matching and configurable rules.

AuthorNeexoCore
Updated
github-actionsissuesautomationtriage

Overview

Eliminates manual issue triage by automatically applying labels when issues are created, based on configurable keyword patterns in .github/labeler.yml.

Labels Applied

  • bug, feature, question, docs — matched by keywords in issue title and body
  • priority:high, priority:low — matched by urgency keywords
  • Language/framework labels — matched by code fence language identifiers

Example Workflow

name: Auto Label
on:
  issues:
    types: [opened]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: github/issue-labeler@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler.yml

Configuration

Create .github/labeler.yml with keyword-to-label mappings:

bug:
  - "(crash|error|broken|fail|exception)"
feature:
  - "(feature request|enhancement|add support)"
question:
  - "(how to|question|help|is there a way)"
docs:
  - "(documentation|readme|typo|docs)"

Note

This uses keyword-based pattern matching, not AI classification. For AI-powered triage, consider combining with a Copilot agent that reads the issue and suggests labels via the GitHub API.

Raw content

Copy this into your project — e.g. .instructions.md, .agent.md, or SKILL.md

## Overview

Eliminates manual issue triage by automatically applying labels when issues are created, based on configurable keyword patterns in `.github/labeler.yml`.

## Labels Applied

- `bug`, `feature`, `question`, `docs` — matched by keywords in issue title and body
- `priority:high`, `priority:low` — matched by urgency keywords
- Language/framework labels — matched by code fence language identifiers

## Example Workflow

```yaml
name: Auto Label
on:
  issues:
    types: [opened]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: github/issue-labeler@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler.yml
```

## Configuration

Create `.github/labeler.yml` with keyword-to-label mappings:

```yaml
bug:
  - "(crash|error|broken|fail|exception)"
feature:
  - "(feature request|enhancement|add support)"
question:
  - "(how to|question|help|is there a way)"
docs:
  - "(documentation|readme|typo|docs)"
```

## Note

This uses keyword-based pattern matching, not AI classification. For AI-powered triage, consider combining with a Copilot agent that reads the issue and suggests labels via the GitHub API.