Repository navigation
feat: add milestone management workflow - #750
elijahbenizzy merged 1 commit into
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 |
There was a problem hiding this comment.
address in next revision
| 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; |
There was a problem hiding this comment.
address in next revision
|
|
||
| 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.
There was a problem hiding this comment.
address in next revision
|
|
||
| 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.
There was a problem hiding this comment.
address in next revision
|
This PR has been inactive for 16 days after receiving review feedback. Please mark it as ready for review when you have addressed the comments. |
0cb1b8d to
052f5d1
Compare
elijahbenizzy
left a comment
There was a problem hiding this comment.
+1, nice work — matches #722 spec well, tests exercise the Python side thoroughly, CI green.
One follow-up worth tracking: the branch-to-milestone regex table lives in both .github/workflows/milestone-management.yml (JS) and scripts/milestone_management_preview.py (Python), with only comment-level "keep in sync" markers. Since only the Python side has tests, the JS can drift silently. Not a blocker for landing this, but worth an issue for a follow-up — either have the workflow shell out to the Python script so it's a single source of truth, or add a CI job that runs the JS logic against the same test cases as the Python tests.
Approving; happy to see this land as-is with the duplication tracked separately.
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