{"record":{"id":"963f2dd45e9e555d","repo":"badges/shields","slug":"no-releases-found-963f2d","errorCode":null,"errorMessage":"no releases found","messagePattern":"no releases found","errorType":"exception","errorClass":"NotFound","httpStatus":404,"severity":"info","filePath":"services/gitlab/gitlab-release.service.js","lineNumber":98,"sourceCode":"\n  static defaultBadgeData = { label: 'release' }\n\n  async fetch({ project, baseUrl, isSemver, orderBy }) {\n    // https://docs.gitlab.com/ee/api/releases/\n    return this.fetchPaginatedArrayData({\n      schema,\n      url: `${baseUrl}/api/v4/projects/${encodeURIComponent(project)}/releases`,\n      httpErrors: httpErrorsFor('project not found'),\n      options: {\n        searchParams: { order_by: orderBy },\n      },\n      firstPageOnly: !isSemver,\n    })\n  }\n\n  static transform({ releases, isSemver, includePrereleases, displayName }) {\n    if (releases.length === 0) {\n      throw new NotFound({ prettyMessage: 'no releases found' })\n    }\n\n    const displayKey = displayName === 'tag' ? 'tag_name' : 'name'\n\n    if (!isSemver) {\n      return releases[0][displayKey]\n    }\n\n    return latest(\n      releases.map(t => t[displayKey]),\n      { pre: includePrereleases },\n    )\n  }\n\n  async handle(\n    { project },\n    {\n      gitlab_url: baseUrl = 'https://gitlab.com',","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/badges/shields/blob/766fd8bc89a90b8534dc573ab72dec30215ab1ec/services/gitlab/gitlab-release.service.js#L80-L116","documentation":"The GitLab release service throws this NotFound when the releases list returned by the GitLab API is empty. With no release objects available it cannot compute the latest version or tag, so it emits a 'no releases found' badge.","triggerScenarios":"Querying the release badge for a project that has never created a GitLab Release (via Releases UI, release CLI, or tag with release notes); or filtering isSemver=true and includePrereleases=false leaving zero matching releases.","commonSituations":"New projects that only push tags but never publish Releases; repos where all releases are marked pre-release and prereleases are excluded; badge added before the first release was cut.","solutions":["Create a GitLab Release for the project (Releases > New release or glab release create)","Create a tag with release notes so GitLab generates a release entry","Relax the query: include prereleases or allow non-semver releases if applicable","Remove the release badge until a release exists"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const releases = await (await fetch(`https://gitlab.com/api/v4/projects/${encodeURIComponent(project)}/releases`)).json()\nif (!Array.isArray(releases) || releases.length === 0) console.warn('No GitLab releases published')","typeGuard":"const hasReleases = (r) => Array.isArray(r) && r.length > 0","tryCatchPattern":"try {\n  const version = GitlabRelease.transform({ releases, isSemver, includePrereleases, displayName })\n} catch (e) {\n  if (e.prettyMessage === 'no releases found') {\n    // render 'v0.0.0' or hide badge\n  } else throw e\n}","preventionTips":["Publish the first GitLab Release before adding the badge","If excluding prereleases, confirm at least one stable release exists","Use tags badge instead if the project tags but never releases"],"tags":["gitlab","release","versioning","not-found"],"backgroundTag":"no-releases-found","analyzedSha":"766fd8bc89a90b8534dc573ab72dec30215ab1ec","analyzedAt":"2026-08-30T01:40:27.499Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}