Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Releases: emit a pre-rendered link field so annotation tooltips can show clickable links

Abierto
#760 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
github, go
Área
backend

Línea de trabajo

Comienza en pkg/github/releases.go, donde el frame Releases actualmente emite la URL y otros campos de la release; revisa el formato de enlace HTML o markdown solicitado y el comportamiento de las anotaciones circundante descrito en AnnotationTooltip2.tsx y standardAnnotationSupport.ts. Se considera terminado cuando el frame Releases expone un campo de enlace pre-renderizado y seleccionable cuyo valor enlaza a la URL de la release con una etiqueta descriptiva.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Use case

We use the Releases query type as a Grafana annotation source on dashboards, so deploys of a service show up as vertical markers on every panel. The natural next step from a marker is "take me to the release notes on GitHub" — i.e. a clickable link in the annotation tooltip pointing at the release page.

Current behavior

The Releases frame exposes a url field containing the release page URL (e.g. https://github.com/org/repo/releases/tag/v1). With the annotation mapping

"mappings": {
  "time": { "source": "field", "value": "published_at" },
  "text": { "source": "field", "value": "url" }
}

the tooltip shows the URL as plain text. It is not clickable.

Why the obvious workarounds don't apply
  • Grafana's annotation tooltip (AnnotationTooltip2.tsx) renders the text field via dangerouslySetInnerHTML={{ __html: textUtil.sanitize(text) }} and the surrounding CSS even styles a elements. So an HTML anchor like <a href="...">v2026.05.29.2</a> in text would render as a clickable link.
  • However, the GitHub plugin's Releases frame (pkg/github/releases.go) only emits plain string fields (name, tag, url, …).
  • Grafana's standard annotation mapping (standardAnnotationSupport.ts) lets the user pick one field per annotation key (time, text, tags, …) — there is no template/concat support, so a user cannot produce <a href="{url}">{tag}</a> from the existing fields.

The net effect: there is no user-side configuration that makes the link clickable.

Requested change

Add one or more pre-formatted link fields to the Releases frame, e.g.:

  • html_link — HTML anchor: <a href="{url}">{tag}</a> (or {name} if non-empty, falling back to {tag})
  • markdown_link — markdown: [{tag}]({url})

Either is sufficient on its own. HTML is the safer bet because the annotation tooltip renders HTML directly; markdown would only help in places that run a markdown renderer.

Users could then pick html_link (or markdown_link) as the annotation text field and get a clickable, descriptively-labelled link in the tooltip.

Scope

Releases is the immediate need (release annotations are a very common use case), but the same applies to:

  • Tags
  • Commits
  • Pull requests
  • Issues

…all of which are commonly used as annotation sources and all of which expose a URL but not a pre-formatted link.

Alternatives considered
  • Switch to the Infinity datasource to call the GitHub REST API and synthesize an html_link column — needs a GitHub PAT configured per Grafana instance and re-implements pagination, caching, etc. that this plugin already handles.
  • Auto-linkify bare URLs in Grafana itself — would have to be filed against grafana/grafana, has wider implications, and doesn't help users who want tag as the link label rather than the raw URL.

A pre-rendered link field on the existing frame is the smallest, most local fix.

Environment
  • Grafana 12.3.3
  • grafana-github-datasource (latest at time of filing)
Lenguaje dominante
Go
Estrellas
310
Forks
70
Merge medio
10 d 1 h
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de grafana/github-datasource

Todos los issues de grafana/github-datasource

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.