wordpress-mobile / wordpress-mobile/release-toolkit
`close_milestone` action should be more forgiving when a milestone is already closed
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 31
- Forks
- 10
- Avg merge
- 5h 45m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb at CloseMilestoneAction and inspect github_helper.get_milestone. Determine how the action should recognize an already closed milestone, then ensure that case completes without raising the “not found” error and behaves as a no-op.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100