Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiVar not working in query type Pull Requests #304

Closed
Official-James opened this issue May 13, 2024 · 5 comments · Fixed by #323
Closed

MultiVar not working in query type Pull Requests #304

Official-James opened this issue May 13, 2024 · 5 comments · Fixed by #323
Assignees

Comments

@Official-James
Copy link

I am trying to use the $__multiVar variable in the Pull Requests query without success. The example given has only been for the Issues query. Has this been tested or implemented on other query types?

Below is the variable configuration

repo-variable

And this is the query I am running.

datasource-query

The result is no data. Run a single repo query shows the results fine, but I would like to see all the Pull Requests from all repos

@gabor
Copy link
Contributor

gabor commented May 23, 2024

hi @Official-James , as a quick check, does this work when you hardcode the name of the repository in the Query field?
i mean writing into it the fixed repository:repo_name?

@gabor gabor self-assigned this May 23, 2024
@gabor gabor moved this to Backlog in OSS Big Tent May 23, 2024
@gabor gabor moved this from Backlog to Awaiting Response in OSS Big Tent May 23, 2024
@gabor gabor removed their assignment May 24, 2024
@Official-James
Copy link
Author

Hi @gabor. Works fine with query repository:"repo_name"

@ivanahuckova
Copy link
Member

Hi @Official-James, I've tried to reproduce your issue following the same setup you have, but in my case with grafana repositories it works as expected.
image
image

Could you please share

  • Just to be sure, are you using following query $__multiVar(repo,$repo)? In your examples you are using $__multiVar(repository,$repo) which is not a valid github query based on https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
  • Could you please check out, if you can reproduce the issue with searching for grafana repositories? Basically the same thing I did in screenshots?
  • Could you provide version of Grafana and Github plugin
  • Could you please share what are the repository names? Or if that is confidential, could you share obfuscated names (e.g. granana/grafana would be test/test. Or confidential/confidential-1-2-3 would be test/test-1-1-1.) In this case, I am trying to see if something in name could be causing the issue - for example special characters.

Thank you!

@ivanahuckova ivanahuckova self-assigned this Jun 17, 2024
@Official-James
Copy link
Author

Thanks, @ivanahuckova. You are correct; my mistake. I have configured it per the documentation (and your comment) and can confirm that the multiVar does not work on the Vulnerabilities query only. This is why I misconfigured it; I was troubleshooting. I have attached a video confirming that the query works on Pull Requests and not on Vulnerabilities, and using the existing fields works.

Grafana.-.GitHub.Vulnerabilities.Query.Issue.mp4

@ivanahuckova
Copy link
Member

@Official-James While investigating the issue, I realised that GitHub does not support the query parameter for vulnerabilityAlerts query that we use. Therefore, in that PR, I am removing the query input, as it is misleading.

Additionally, if we want to implement this feature, GitHub would need to support query for vulnerabilityAlerts. If this would be beneficial for you, I recommend starting by writing a feature request here: https://github.com/orgs/community/discussions?discussions_q=is%3Aopen+vulnerabilityAlerts+.

I have provided more details in PR #323 that fixes the bug with showing the query input that should not be there.

@github-project-automation github-project-automation bot moved this from Awaiting Response to Complete in OSS Big Tent Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
3 participants