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

Log scopeQuery as it will be sent to Sourcegraph #135

Merged
merged 1 commit into from
Feb 19, 2020
Merged

Conversation

mrnugget
Copy link
Contributor

This should help with the problem encountered in #125 by making it easier to debug the scopeQuery.

The change here adds another logline to src actions scope-query when the -v flag is given and changes the existing log in src actions exec to show the scope query as it will be sent over the wire.

Example

unescaped.action.json:

{
  "scopeQuery": "repo:github\.com\/sourcegraph\/sourcegraph$|basic-code-intel$ repohasfile:yarn.lock file:^package.json$ rxjs"
}
$ src -v action scope-query -f unescaped.action.json                                                                                                                -130-
# scopeQuery in action definition: repo:githubcom/sourcegraph/sourcegraph$|basic-code-intel$ repohasfile:yarn.lock file:^package.json$ rxjs
# 1 repositories match.
github.com/sourcegraph/sourcegraph-basic-code-intel

escaped.action.json:

{
  "scopeQuery": "repo:github\\.com\\/sourcegraph\\/sourcegraph$|basic-code-intel$ repohasfile:yarn.lock file:^package.json$ rxjs"
}
$ src -v action scope-query -f escaped.action.json
# scopeQuery in action definition: repo:github\.com\/sourcegraph\/sourcegraph$|basic-code-intel$ repohasfile:yarn.lock file:^package.json$ rxjs
# 2 repositories match.
github.com/sourcegraph/sourcegraph-basic-code-intel
github.com/sourcegraph/sourcegraph

This should help with the problem encountered in #125 by making it
easier to debug the scopeQuery.

The change here adds another logline to `src actions scope-query` when
the `-v` flag is given and changes the existing log in `src actions
exec` to show the scope query as it will be sent over the wire.
@mrnugget mrnugget merged commit 0898259 into master Feb 19, 2020
scjohns pushed a commit that referenced this pull request Apr 24, 2023
This should help with the problem encountered in #125 by making it
easier to debug the scopeQuery.

The change here adds another logline to `src actions scope-query` when
the `-v` flag is given and changes the existing log in `src actions
exec` to show the scope query as it will be sent over the wire.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants