Questions tagged [sourcegraph]

Questions around using/configuring/installing Sourcegraph's code search and code intelligence tools.

17 questions
8
votes
2 answers

Nginx reverse proxy subdirectory rewrites for sourcegraph

I'm trying to have a self hosted sourcegraph server being served on a subdirectory of my domain using a reverse proxy to add an SSL cert. The target is to have http://example.org/source serve the sourcegraph server My rewrites and reverse proxy look…
Cookie
  • 113
  • 1
  • 1
  • 7
7
votes
1 answer

How do I filter by file type on Sourcegraph?

I want to do a Sourcegraph search and have it show only results from files with a certain extension.
felixfbecker
  • 2,273
  • 1
  • 19
  • 24
2
votes
1 answer

Search github repo for term with special characters using sourcegraph?

The top answer to How to search on GitHub to get exact string matches, including special characters shows a way to search GitHub for terms that include special characters using a tool called sourcegraph. I got that…
stevec
  • 41,291
  • 27
  • 223
  • 311
2
votes
0 answers

Opaque error with self-hosted Sourcegraph and Google Workspace SMTP relay config

Finally deployed a self-hosted Sourcegraph, v3.39.1. I'm running on Google Compute Engine on a Container Optimized OS VM. Got everything working except I'm having difficulty getting SMTP set up though Google Workspace's smtp-relay. When I run a…
crunk1
  • 2,560
  • 1
  • 26
  • 32
1
vote
1 answer

Count number of lines of code over time in sourcegraph?

I want to build nice insights graph depicting how the lines count in a file changed over time.
Stranger95
  • 123
  • 1
  • 9
1
vote
1 answer

How to highlight nested structure in SourceGraph structured search?

I have the following SourceGraph structured search: repo:… file:… "tls_certs" {...default = {...}...} which correctly matches: variable "tls_certs" { description = "…" type = map(string) default = { … } } It's currently…
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
1
vote
1 answer

Sourcegraph VSCode - A patternType: filter is required in the query for all saved searches

I am trying to save search query in sourcegraph vscode extension. Name: "Master Search" Query: "context:global repo:^teams/master$ getSiteSettings" Clicked "Add saved search" Error: A patternType: filter is required in the query for all saved…
Rohit
  • 6,365
  • 14
  • 59
  • 90
1
vote
1 answer

How to get web url of a file from sourcegraph VSCode extension?

I have installed sourcegraph VScode extension and it works well to search code. Often times I need to share the sourcegraph code link with the team. I am not able to find the ability to access sourcegraph url from the extension. I search for some…
Rohit
  • 6,365
  • 14
  • 59
  • 90
1
vote
1 answer

How to tell if a string ever existed in my repo using SourceGraph?

I want to see if a string ever existed in my repo (deleted file, changed file, etc). In git, I think it would like this - git grep $(git rev-list --all). This is based on this post How to grep (search) committed code in the Git history Can…
PartOfTheOhana
  • 667
  • 2
  • 16
  • 40
1
vote
1 answer

How can I use RegEx in Source Graph properly?

I have virtually no knowledge of how to use Source Graph but I do know what Source Graph is and what RegEx is and its application across platforms. I am trying to learn how to better search for strings, variables, etc. in Source Graph so I can solve…
Jonathan
  • 11
  • 2
1
vote
0 answers

How to run GraphQL search query (with regex) using CURL?

I am trying to get the occurrence count of Dialog( in my repository using SourceGraph API via curl. I am using regex in search. It doesn't seem to work as it returns resultCount as 0 Curl request: curl -H 'Authorization: token API_TOKEN' -d…
1
vote
2 answers

Visual studio code is shows gitlens always, what setting does cause this ?

Hi I am using Visual Studio code for JavaScript project, but suddently it started showing gitlens layout on left side of every file i open, i tried all possibilities, uninstall git related extensions and restarted VSCode, but it is still showing…
user7175350
  • 91
  • 2
  • 9
1
vote
1 answer

More advanced search with SourceGraph

I am trying to create a query that states the following: Find me repos that have file 'baz', which contain 'foo', and also contain file 'bar'. What I have now doesn't include the second part: file:baz foo
Schultz9999
  • 8,717
  • 8
  • 48
  • 87
0
votes
1 answer

Nested structured search is Sourcegraph?

I would like to search Java annotations with another annotations inside. I don't know how many nested levels there are or I don't want to specify it. Finally, I would like to search for examples of @ApiImplicitParams with param type body and with…
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
1 answer

Fetch projects greater than 100 from gitlab for sourcegraph projectQuery

I am updating a sourcegraph's projectQuery configuration for gitlab but gitlab's (for the version I have) max count per page is 100 therefore, I can not get all the projects in a single query because I have more than 100 projects although I can add…
DDStackoverflow
  • 505
  • 1
  • 11
  • 26
1
2