feat: add milestone management workflow#750
Conversation
|
|
||
| import argparse | ||
| import re |
There was a problem hiding this comment.
burr supports py3.9 per pyproject.toml but str | None on line 42 needs 3.10+. import breaks on 3.9 and the test file blows up with it since it loads the module at top level.
| import argparse | |
| import re | |
| from __future__ import annotations | |
| import argparse | |
| import re | |
| import sys |
| if (!milestone) { | ||
| throw new Error( | ||
| "No open X.Y.Z milestone found for main. Create one with the workflow_dispatch path first." |
There was a problem hiding this comment.
this fails the workflow run on every merge until a milestone exists. a console.warn + return would skip quietly instead of spamming failed-run notifications.
| if (!milestone) { | |
| throw new Error( | |
| "No open X.Y.Z milestone found for main. Create one with the workflow_dispatch path first." | |
| console.warn(`#${pr.number}: no open X.Y.Z milestone for main, skipping assignment.`); | |
| return; |
|
|
||
| def test_missing_release_branch_milestone_raises_error(): | ||
| with pytest.raises(ValueError, match="Expected an open milestone named '0.43.1'"): | ||
| preview.choose_milestone("release-0.43.1", ["0.43.0"]) |
There was a problem hiding this comment.
the JS in the workflow has the same logic but no tests. preview script mirrors it today, will drift later. worth testing the JS too, or at least a comment in both files saying they must stay in sync.
|
|
||
| def test_missing_release_branch_milestone_raises_error(): | ||
| with pytest.raises(ValueError, match="Expected an open milestone named '0.43.1'"): | ||
| preview.choose_milestone("release-0.43.1", ["0.43.0"]) |
There was a problem hiding this comment.
missing coverage for release/0.43.1 (slash variant), apache-burr-0.43.1-release, and the release-0.43 minor fallback. regex handles them but nothing exercises that path.
Add milestone management automation for release tracking.
Changes
.github/workflows/milestone-management.ymlto auto-assign milestones on merged PRsmainand release/test branch patternsworkflow_dispatchsupport to create or re-open upcomingX.Y.Zmilestonesscripts/README.mdscripts/milestone_management_preview.pyfor local milestone-selection checkstests/test_milestone_management_preview.pyHow I tested this
.venv311/bin/python -m pytest tests/PRE_COMMIT_HOME=.pre-commit-cache .venv311/bin/pre-commit run --all-files.venv311/bin/python -m pytest tests/test_milestone_management_preview.pyscripts/milestone_management_preview.pymanually formain, release branches, and unmanaged branchesNotes
X.Y.Zconvention requested in issue ci: milestone management workflow #722mainpick the earliest openX.Y.Zmilestoneworkflow_dispatch; merged-PR assignment is automatic once milestones existChecklist