Skip to content

fix(github): gh milestones edit without --state closes the milestone #777

Closed

Description

@dan-petty

Context & Rationale

devops gh milestones edit v0.3.0 --description x closes the milestone. edit_repository_milestone leaves state out unless --state is passed (github/milestones.py:325), and GitHubClient.edit_milestone defaults it to "closed" (github/client.py:275); GhCliClient.edit_milestone defaults it to None. _get_github_client() returns a GitHubClient whenever a token resolves, which is nearly always. The tests pass MagicMock clients (tests/test_gh_issues_milestones.py:40-80), so neither default is exercised. Releases are milestones (ADR 0001) and the current release is the lowest open one, so closing one by accident changes which release is current.

Scope & Deliverables

  • Deliverable: editing a milestone changes only the fields passed, with state unchanged by default in both clients, and a test drives the command through each client's default.
  • Constraint: none.

Strategic Alignment

Activity

  1. added
    type/bug
    scope/github
    priority/p1-high
    on Oct 1, 2026
  2. dan-petty commented on Oct 1, 2026

    @dan-petty
    OwnerAuthor

    Placement (2026-10-01): stays in the backlog with no release slot. #768 (v0.2.25) covers this bug with an explicit acceptance criterion and deletes both clients' milestone methods. Close this as a duplicate when #768 merges.

  3. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Fixed by #919 (#768), merged into release/v0.2.25. devops gh milestones edit now runs on the roadmap store and sends only the fields it is given, so an edit without --state leaves the milestone open (test_cli_gh_milestones_edit_leaves_the_release_open). GitHubClient.edit_milestone, whose state="closed" default caused this, is deleted.

  4. added this to the v0.2.25 milestone on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions