grafana / github-datasource

Grafana data source plugin using the Github API to retrieve and visualize Github data.
https://grafana.com/grafana/plugins/grafana-github-datasource/
Apache License 2.0
230 stars 54 forks source link

Cannot easily use "all" GitHub labels as a dashboard variable #112

Open eamonryan opened 3 years ago

eamonryan commented 3 years ago

Grafana: 7.4.3 Plugin version: 1.0.6 Browser: Firefox 85.0.1 for Ubuntu (actually elementaryOS)

What's happening: I'm trying to use GitHub labels as a dashboard variable to filter on various things. Adding label:$labels for example to a panel query works fine if you select a label from the dropdown.

However, if you want to not filter by any label, there doesn't seem to be an easy way to do that.

What I expected to happen: If I select "All" for labels and my panel queries have labels:$labels as part of the query, I'd expect the query to return all results regardless of labels.

What I think is causing it: I don't think GitHub has the notion of a labels:all or labels:* (correct me if I'm wrong) - if you want all labels, you just don't add labels to your query, but that's hard to translate to a panel query as you either have it or you don't.

Ideally, if I select "All" for labels and my panel queries have labels:$labels as part of the query, there could maybe be some logic to simply remove the labels: part of the query.

kminehart commented 3 years ago

Would having a "custom all value" in the variable query work here? does it allow for emptystring?

eamonryan commented 3 years ago

Would having a "custom all value" in the variable query work here? does it allow for emptystring?

Directly on GitHub, adding label:"" or label:* or label:all doesn't seem to work. As yet I haven't been able to find a value for label: that would have the same result as not having label: at all.

kminehart commented 3 years ago

Oh I understand now. Gotya. Yeah I'll see what I can come up with.

eamonryan commented 3 years ago

Just to add - the exact same issue applies to Milestones too, so if you can figure out a fix it'd be cool to do for both.

shreyasgp commented 2 years ago

Still facing the same issue, any fix?

u001920 commented 1 year ago

is there any easy way to display the metrics of all repositories?