Repository navigation
feat: label issues and PRs with a small model - #29
Conversation
|
Quick test run on desktop-sdk
|
scripts/ai-label.sh labels open unlabeled issues and PRs org-wide, per repo or per item. PRs use their conventional commit prefix, the rest asks GitHub Models in Actions or Claude Haiku locally (no tools). Model output is limited to an allowlist and to labels the repo has. --triage drafts a first reply locally, a maintainer reviews it before posting. Adds regression and high severity labels and the ai-label workflow template. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Groups model labels into type (max 1), area (max 2) and extras, enforced in code. Adds performance, security, i18n, integration, format: pdf, linux, windows, macos and mobile, renames high severity to high. Dry runs report labels a repo still lacks. fix(ci) and fix(build) PRs get build. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Temporary GHSA advisory forks have issues disabled and reject label creation. No-test: one-line repo filter, verified with a dry run (45 repos, no GHSA forks) Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
The conventional commit type is now a hint in the prompt, so PRs also get area and platform labels. Dependency update PRs still skip the model. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Covers CEF, V8, boost, Qt and anything under 3dparty/ or 3rdparty/, not only bot update PRs. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
316ccf4 to
7eb513f
Compare
chrip
left a comment
There was a problem hiding this comment.
Approve. Looks good to merge.
This adds a script and a workflow template that label new issues and PRs with a small model, plus the new labels in sync-labels.sh. I read the workflow and the script for injection risks and found none. The workflow uses pull_request_target, but it never checks out PR code and uses no third-party actions. Only the repo name and the item number go into env, and no issue or PR text reaches a run line. That text reaches the model only on stdin, and the model's answer is cut down to the allowlist and to labels the repo already has, so a prompt injection can at worst pick wrong labels from that list. In Actions the script never comments, and labels added with the workflow token don't start other workflows, so nobody gets pinged. The workflow loads ai-label.sh from main of this repo at run time, so a script change goes live in every repo as soon as it is merged here. That's fine while main here stays protected.
suggestion: Try the workflow in one repo before rolling it out to all of them. The live GitHub Models call hasn't been tested yet, and if Models is off for the org or the token can't use it, every new issue and PR in every repo gets a failing run. The "Sync workflow template to repos" workflow takes template: ai-label with a single repo in repos.
nitpick (non-blocking): workflow-templates/ai-label.yml sets no timeout-minutes, and the curl call at scripts/ai-label.sh:66 has no --max-time. A hung request keeps the job running until the six-hour default. timeout-minutes: 5 on the job would cover it.
praise: The allowlist leaves out no-tests-needed, wontfix and the other labels that change what happens to an item, so an injected issue can't switch off the require-tests check. The end-to-end test with an injected issue body shows the allowlist holds.
Assisted-by: ClaudeCode:claude-opus-5-5
Adds
scripts/ai-label.shto label open issues and PRs that have no label (515 across the org today), runnable locally and as a workflow template for new items.(deps)scope) getdependencieswithout a model callbug,enhancement,documentation,questionbuild,dependencies(incl. third-party code like CEF, V8, boost,3dparty/),docker,packages,tests,design,performance,security,i18n,integration,format: odf|ooxml|pdflinux,windows,macos,mobile,regression,high(high severity)GITHUB_TOKEN,models: read) in Actions, Haiku locally via the CLI with no tools, no MCP and no settings, so issue text can't run anything--triage(local only): drafts a first reply, possible duplicates, missing info. Never accepts, declines or closes.--postasks per draft before posting--prs,--issues,--repo,--item,--limit,--dry-runsync-labels.sh: adds the new labels (performance,linux,windows,macosreuse existing colors), skips repos with issues disabled (GHSA advisory forks reject labels). Already run org-wide from this branchworkflow-templates/ai-label.ymlruns it on opened issues and PRs, never checks out PR codeAI_POLICY.md: one line on maintainer AI labeling and reviewed triage draftsTested: self-check (19 checks, stubbed gh and model), dry runs with Haiku on server, DocumentServer and DesktopEditors (157 items) with two prompt iterations, triage draft on DocumentServer#500, shellcheck and zizmor clean. Not yet tested: the live GitHub Models call and the workflow in a real repo.
After merge: a reviewed backlog run, then
sync-workflow.sh --template ai-label.AI-assisted, see Assisted-by trailer.