badges/shields · info · InvalidResponse
no milestone
Error message
no milestone
What it means
The GitHub issue-detail service renders a 'milestone' badge from the issue's `milestone` field. The Joi schema declares `milestone` as an object that is `.allow(null)` — GitHub returns null when an issue has no milestone. Since a badge cannot render a null milestone, `transform` throws `InvalidResponse` with 'no milestone'.
Source
Thrown at services/github/github-issue-detail.service.js:162
render: ({ property, value }) => {
const label = property === 'age' ? 'created' : 'updated'
return {
...renderDateBadge(value),
label,
}
},
}
const milestoneMap = {
schema: Joi.object({
...commonSchemaFields,
milestone: Joi.object({
title: Joi.string().required(),
}).allow(null),
}).required(),
transform: ({ json }) => {
if (!json.milestone) {
throw new InvalidResponse({ prettyMessage: 'no milestone' })
}
return json.milestone.title
},
render: ({ value }) => ({
label: 'milestone',
message: value,
color: 'informational',
}),
}
const propertyMap = {
state: stateMap,
title: titleMap,
author: authorMap,
label: labelMap,
comments: commentsMap,
age: ageUpdateMap,
'last-update': ageUpdateMap,View on GitHub (pinned to 766fd8bc89)
Solutions
- Assign a milestone to the issue on GitHub
- Check the issue number/repo in the badge URL
- Choose a badge that handles milestone-less issues or guard the request
Example fix
// before /badge/issue-milestone/user/repo/123 // issue has no milestone -> error // after (in GitHub) assign issue 123 to milestone 'v2.0'
Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
try {
const milestone = await getIssueMilestone(user, repo, issueNumber)
} catch (e) {
if (e.message === 'no milestone') return null // show 'no milestone' placeholder
throw e
} Prevention
- Assign a milestone to the issue before using a milestone badge
- Double-check the issue number in the badge URL
- Be ready for null milestones — GitHub allows issues without them
When it happens
Trigger: Requesting an issue-milestone badge for an issue that has no milestone assigned; API returns 200 with `milestone: null`.
Common situations: Issue was never assigned to a milestone; milestone was removed from the issue; querying the wrong issue number.
Related errors
- no labels found
- no commits found
- unknown type, provider, or upstream issue
- gist not found
- Unable to select next GitHub token from pool
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/1899ce4afc2a7369.
Report an issue: GitHub.