Commit Graph

8 Commits

Author SHA1 Message Date
Salman Muin Kayser Chishti
4cf7a3aca8 Upgrade GitHub Actions for Node 24 compatibility
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-19 09:19:52 +00:00
Vijay Janapa Reddi
83a3ce3712 fix(ci): use pull_request_target for auto-label write permissions
Fork PRs downgrade GITHUB_TOKEN to read-only, causing 403 when
applying labels. pull_request_target runs in the base repo context
and grants the declared write permissions.
2026-02-03 22:08:20 -05:00
Vijay Janapa Reddi
35ffcc45a8 feat(auto-label): dynamic LLM-powered issue labeling with llama3.1:8b
- Fetch labels dynamically from GitHub API at runtime
- Group labels by prefix (area:, type:, format:, other)
- Use llama3.1:8b model for accurate classification
- Normalize label spacing (handle "area:x" vs "area: x")
- Use env vars to safely pass LLM response (avoids template string issues)
- Add workflow_dispatch for manual testing on existing issues

Tested: 8B model correctly identifies tinytorch vs book issues.
1B/3B models had accuracy issues with area classification.
2026-01-22 10:49:02 -05:00
Vijay Janapa Reddi
e61f7d6955 chore(auto-label): use llama3.1:8b for better accuracy 2026-01-22 10:35:35 -05:00
Vijay Janapa Reddi
9760e0a1ec chore(auto-label): use llama3.2 (3B) instead of 1B for better accuracy 2026-01-22 10:35:03 -05:00
Vijay Janapa Reddi
94a2c976ff refactor(auto-label): fetch labels dynamically from GitHub API
- Remove all static label definitions
- Fetch labels at runtime via GitHub API (listLabelsForRepo)
- Group labels by prefix (area:, type:, format:, other)
- Pass dynamic label lists to LLM for analysis
- Validate LLM response against actual repo labels only
- Add workflow_dispatch trigger for manual testing on existing issues/PRs

Now adding/removing labels in GitHub automatically updates the workflow
without any code changes.
2026-01-22 10:33:53 -05:00
Vijay Janapa Reddi
3907363d59 refactor(auto-label): use existing GitHub labels with LLM selection
- Remove fallback path-based labeler (pr-labeler.yml, labeler.yml)
- Define all valid labels at top of workflow for easy maintenance
- LLM picks from predefined area/type/special labels only
- Strict validation ensures only valid labels are applied
- Defaults to 'area: book' and 'type: improvement' if unsure

Labels used:
- Area: book, tinytorch, kits, collabs, tools, website, socratiq
- Type: bug, errata, improvement, new, question, code, citation
- Special: good first issue
2026-01-22 10:30:39 -05:00
Vijay Janapa Reddi
c957137b3a feat(workflows): add auto-labeling for issues and PRs
- LLM-powered labeler (auto-label.yml): Uses Ollama llama3.2:1b to analyze
  issue/PR content and apply project + type labels automatically
- Path-based PR labeler (pr-labeler.yml): Fast fallback using file paths
- Updated doc emoji title to 'Word Wizard'

This enables all-contributors to auto-detect projects from labels.
2026-01-22 10:28:56 -05:00