Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/issue_classifier/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__/
*.pyc
.venv/
data/*.jsonl
data/*.json
!data/.gitkeep
69 changes: 69 additions & 0 deletions scripts/issue_classifier/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# GitHub Issue Classification System

Classify and label GitHub issues in the vaadin/flow repository using LLM-assisted analysis.

## Quick Start

```bash
# 1. Set up the environment
cd scripts/issue_classifier
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# 2. Set your Anthropic API key
export ANTHROPIC_API_KEY="your-key-here"

# 3. Ensure gh CLI is authenticated
gh auth login

# 4. Run the workflow
cd scripts # Must run from scripts/ directory
python -m issue_classifier fetch # Fetch all issues
python -m issue_classifier classify --all # Classify with LLM
python -m issue_classifier review # Review classifications
python -m issue_classifier apply --dry-run # Preview changes
python -m issue_classifier apply # Apply labels
```

## Commands

| Command | Description |
|---------|-------------|
| `fetch` | Fetch all open issues from GitHub |
| `classify` | Classify issues using LLM |
| `resume` | Resume classification from checkpoint |
| `review` | Interactive review of classifications |
| `apply` | Apply approved label changes |
| `report` | Generate summary reports |
| `stats` | Show quick statistics |
| `show <number>` | Show details for a specific issue |

## Workflow

1. **Fetch** - Download all open issues to `data/issues/issues.jsonl`
2. **Classify** - Use Claude to analyze and classify each issue
3. **Review** - Manually approve/modify each classification (required)
4. **Apply** - Apply approved labels to GitHub

## Data Files

- `data/issues/issues.jsonl` - All issues in JSON Lines format
- `data/issues/issues_meta.json` - Progress metadata
- `data/issues/audit_log.jsonl` - Record of all label changes

## Classification Schema

Each issue is classified with:

- **Type**: `bug`, `enhancement`, or `feature request`
- **Impact** (bugs only): `High` or `Low`
- **Severity** (bugs only): `Major` or `Minor`
- **Modules**: Which parts of the codebase are affected
- **Good First Issue**: Whether suitable for new contributors

## Requirements

- Python 3.9+
- `gh` CLI authenticated (`gh auth login`)
- `ANTHROPIC_API_KEY` environment variable
3 changes: 3 additions & 0 deletions scripts/issue_classifier/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""GitHub Issue Classification System for vaadin/flow."""

__version__ = "0.1.0"
6 changes: 6 additions & 0 deletions scripts/issue_classifier/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Allow running as `python -m issue_classifier`."""

from .cli import main

if __name__ == "__main__":
main()
Loading
Loading