Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Incompatible gh api --slurp --jq options break backfill and opened-issue labeling, while concurrent label creation can also abort labeling on an unhandled HTTP 422 conflict.
2 open issues
What changed in this PR
Adds title-based issue labeling to NVX’s repository automation, with automatic labeling for newly opened issues and a preview-first backfill command.
Changes:
- Matches title keywords to area and platform labels while preserving existing labels and metadata.
- Adds an issue-opened workflow using trusted default-branch code and limited permissions.
- Adds mocked tests to Linux and Windows validation and documents usage and limitations.
| File | Description |
|---|---|
scripts/test_label_issues.py |
Tests matching, preview safety, additive labeling, failures, and workflow wiring. |
scripts/label_issues.py |
Implements keyword matching, GitHub label operations, and backfill commands. |
doc/ci.md |
Documents labeling rules, commands, permissions, and limitations. |
.github/workflows/label-issues.yml |
Runs labeling when an issue opens. |
.github/actions/validate-nvx/action.yml |
Adds labeling tests to Linux and Windows validation. |
Review effort: Balanced
| "--paginate", | ||
| "--slurp", | ||
| "--jq", | ||
| '[.[][] | select(has("pull_request") | not) ' | ||
| "| {number, title, state, labels}]", |
| self.api( | ||
| f"{self.root}/labels", | ||
| method="POST", | ||
| body={ | ||
| "name": label, | ||
| "color": "c5def5" if label.startswith("area:") else "bfdadc", | ||
| "description": "Initial title-keyword triage suggestion", | ||
| }, | ||
| ) |
|
serena256 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|


What and why
Add simple title-based issue labeling:
--applyto make changes.Editing or reopening issues does not trigger labeling. No live backfill was
applied, and this PR does not change the OpenVMM pin.
Validation
Run locally on Windows:
python -m unittest scripts.test_label_issues -v— passed, 12 tests.Covers matching, preview safety, additive labeling, failures, and workflow wiring.
GitHub calls are mocked.
python -m ruff check scripts\label_issues.py scripts\test_label_issues.py— passed.python -m ruff format --check scripts\label_issues.py scripts\test_label_issues.py— passed.python -m pyright --pythonplatform Windows scripts\label_issues.py scripts\test_label_issues.py— passed.python -m pyright --pythonplatform Linux scripts\label_issues.py scripts\test_label_issues.py— passed.python scripts\check_markdown_links.py— passed.python scripts\check_test_layout.py— passed.python scripts\check_test_changes.py --base origin/dev— passed;reports 17 additions and no changes to existing tests.
git diff --check origin/dev...HEAD— failed: trailing whitespace onlines 29–30 of
scripts/label_issues.py; needs cleanup.The CI validation action now includes the new test module in both platform
test lists. No existing test behavior was changed.
actionlintis unavailable locally. Full local gates, live GitHub workflowexecution, and native Linux execution were not run. No VM or backend tests
were needed.