Skip to content

close_milestone action should be more forgiving when a milestone is already closed #568

Description

@iangmaia

In the CloseMilestoneAction, we first fetch the milestone to be able to close it, throwing an error if the milestone is nil:

milestone = github_helper.get_milestone(repository, milestone_title)
UI.user_error!("Milestone #{milestone_title} not found.") if milestone.nil?

The problem with that is a situation seen a couple of times during release management: closed milestones aren't returned by github_helper.get_milestone.

We should either stop raising this error completely or find a way in the API to get a milestone even when closed, so that at least we would avoid raising the error in such cases and the action becomes a no-op.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions