badges/shields · error · NotFound
no matching tags found
Error message
no matching tags found
What it means
The GitHub tag service lists repository tags via GraphQL, applies an optional `filter` regexp, and throws `NotFound` when the resulting list is empty. The message distinguishes cases: 'no matching tags found' means tags exist but none matched the requested `filter` pattern. It is a filtering result, not a fetch failure.
Source
Thrown at services/github/github-tag.service.js:115
return latest(tags, { pre: includePrereleases })
}
return tags[0]
}
async handle({ user, repo }, queryParams) {
const sort = queryParams.sort
const includePrereleases = queryParams.include_prereleases !== undefined
const filter = queryParams.filter
const limit = this.constructor.getLimit({ sort, filter })
const json = await this.fetch({ user, repo, limit })
const tags = this.constructor.applyFilter({
tags: json.data.repository.refs.edges.map(edge => edge.node.name),
filter,
})
if (tags.length === 0) {
const prettyMessage = filter ? 'no matching tags found' : 'no tags found'
throw new NotFound({ prettyMessage })
}
return renderVersionBadge({
version: this.constructor.getLatestTag({
tags,
sort,
includePrereleases,
}),
})
}
}
const redirects = {
GithubTagRedirect: redirector({
category: 'version',
route: {
base: 'github/tag',
pattern: ':user/:repo',
},View on GitHub (pinned to 766fd8bc89)
Solutions
- Adjust the `filter` regexp to match the repo's actual tag naming scheme
- List the repo's tags on GitHub and align the filter with them
- Remove the `filter` parameter to use the unfiltered tag list
- Tag the repository with names matching the expected pattern
Example fix
// before /badge/tag/user/repo?filter=^v\d // repo tags are '1.0.0', '2.0.0' -> no matching tags found // after /badge/tag/user/repo?filter=^\d+\.\d+\.\d+$
Defensive patterns
Strategy: validation
Validate before calling
const { data } = await fetch(`https://api.github.com/repos/${user}/${repo}/tags`).then(r => r.json())
const names = data.map(t => t.name)
if (filter && !names.some(n => new RegExp(filter).test(n))) {
throw new Error(`no tag matches filter '${filter}'; tags: ${names.join(', ')}`)
} Type guard
null
Try / catch
try {
await fetchTagBadge(user, repo, filter)
} catch (e) {
if (e.message === 'no matching tags found') return 'no tag'
throw e
} Prevention
- Test your filter regexp against the repo's actual tag names
- Remember 'no matching tags found' means filtering, not absence of tags — try removing `filter` to debug
- Keep tag naming conventions consistent (e.g. always v-prefixed)
When it happens
Trigger: Requesting a tag badge with a `filter` query param whose regexp matches none of the repository's tag names; tags array is non-empty but every name fails the filter.
Common situations: Filter pattern typo (e.g. filter=v[0-9] when tags lack the 'v' prefix); repository only has un-tagged releases; expecting semver tags but repo uses different naming; filter intended for another repo's conventions.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/0e0b28d07207add3.
Report an issue: GitHub.