mislav/hub · error
error: no milestone found with name '%s'
Error message
error: no milestone found with name '%s'
What it means
`milestoneValueToNumber` resolves a milestone given by name to its number by case-insensitively comparing against all milestones fetched for the repository. If no milestone title matches the provided value, it returns this error. The lookup is exact-modulo-case: partial names or numbers-as-strings do not match.
Source
Thrown at commands/issue.go:848
if value == "" {
return 0, nil
}
if milestoneNumber, err := strconv.Atoi(value); err == nil {
return milestoneNumber, nil
}
milestones, err := client.FetchMilestones(project)
if err != nil {
return 0, err
}
for _, milestone := range milestones {
if strings.EqualFold(milestone.Title, value) {
return milestone.Number, nil
}
}
return 0, fmt.Errorf("error: no milestone found with name '%s'", value)
}
func transferIssue(cmd *Command, args *Args) {
if args.ParamsSize() < 2 {
utils.Check(cmd.UsageError(""))
}
localRepo, err := github.LocalRepo()
utils.Check(err)
project, err := localRepo.MainProject()
utils.Check(err)
issueNumber, err := strconv.Atoi(args.GetParam(0))
utils.Check(err)
targetOwner := project.Owner
targetRepo := args.GetParam(1)
if strings.Contains(targetRepo, "/") {View on GitHub (pinned to 5c547ed804)
Solutions
- List milestones (`gh milestone list` or web UI) and use the exact title, e.g. `--milestone "v1.0"`.
- Check you are in the intended repository — milestone lookup is repo-scoped.
- If the milestone was renamed/deleted, update scripts to the current title or recreate it.
Example fix
// before gh issue list --milestone "v1" // no milestone titled v1 // after gh issue list --milestone "v1.0" // exact existing title
Defensive patterns
Strategy: validation
Validate before calling
milestones := fetchMilestones(repo)
var match *github.Milestone
for _, m := range milestones {
if strings.EqualFold(m.Title, wanted) {
match = &m
break
}
}
if match == nil {
fmt.Fprintf(os.Stderr, "milestone %q not found; available:\n", wanted)
for _, m := range milestones {
fmt.Println(" -", m.Title)
}
os.Exit(2)
} Prevention
- Use exact milestone titles from `gh milestone list` (case-insensitive, no partials).
- Confirm the repository context — milestones are repo-scoped.
- Update automation when milestones are renamed or deleted.
When it happens
Trigger: Passing `--milestone <name>` to `gh issue` (listIssues), `setMilestoneFromArgs`, or via `pullRequest` where `<name>` matches no milestone title in the repo (case-insensitive).
Common situations: Typos or partial names (`v1` vs `v1.0`); the milestone was deleted or renamed; targeting the wrong repository which has different milestones; passing a milestone number where a title is expected.
Related errors
- no such file in gist
- This gist contains multiple files, you must specify one: %
- Error: No pull request number given
- no open pull requests found for branch '%s'
- Unable to find release with tag name `%s'
AI-assisted analysis of mislav/hub@5c547ed804 (2026-09-01).
Data as JSON: /api/errors/61cced96c0d251ea.
Report an issue: GitHub.