What other variables are available for queries besides ${user} ?
The README has some great examples of how queries are constructed, but I was curious where the value for ${user} comes from and whether there are any other variables available when adding custom queries.
I'd love to be able to reference things like the current branch name, or maybe even the current commit hash, etc. Something like this (doesn't work obviously):
{
"githubPullRequests.queries": [
{
"label": "PRs for Current Branch",
"query": "is:pr is:open head:${branch}"
}
]
}
To answer my own question, it looks like currently the ${user} is the only available variable. Consider labeling this as a feature request rather than a question. I'd love to include other dynamic values in my PR queries (namely the currently checked out branch name).
Hi.
Is there any updated list of variables that we can use now? Or are we still limited to {$user} only? I checked the updated code, but I can't figure out where the variables are checked and replaced now.
Specifically, I'm looking for a way to specify the organisation that the current repo belongs to, such as ${organisation}.
Right now I need to hard-code the org name in the settings:
{
"label": "Waiting For My Review: MyOrg",
"query": "is:open review-requested:${user} org:MyFullOrganisationName"
},
That works fine if all your repos belong to a single organisation, but breaks when you switch between different orgs, or between work and personal stuff.