github-datasource icon indicating copy to clipboard operation
github-datasource copied to clipboard

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

Open eamonryan opened this issue 4 years ago • 6 comments

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.

eamonryan avatar Mar 03 '21 20:03 eamonryan

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

kminehart avatar Mar 03 '21 20:03 kminehart

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.

eamonryan avatar Mar 03 '21 21:03 eamonryan

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

kminehart avatar Mar 03 '21 21:03 kminehart

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.

eamonryan avatar Mar 04 '21 00:03 eamonryan

Still facing the same issue, any fix?

shreyasgp avatar Apr 21 '22 18:04 shreyasgp

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

u001920 avatar Jan 19 '23 19:01 u001920