Batch changes: remove structural search example (#62958)

This PR refactors a batch changes example that uses `patterntype:structural` to
use regex instead. We no longer expose `patterntype:structural` by default, and
want to push users towards other pattern types.
This commit is contained in:
Julie Tibshirani 2024-05-30 08:47:46 -07:00 committed by GitHub
parent 70d2439f77
commit e45ec596b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ description: |
# Find all repositories that contain the `fmt.Sprintf` statement using structural search
on:
- repositoriesMatchingQuery: lang:go fmt.Sprintf("%d", :[v]) patterntype:structural
- repositoriesMatchingQuery: lang:go fmt.Sprintf\("%d", \w+\) patterntype:regexp
steps:
# Run Comby (https://comby.dev) to replace the Go statements...

View File

@ -25,6 +25,6 @@ Set `dev-private` site config to use `"observability.tracing": { "type": "opente
## Testing
Use `sg start` to start services, and run a complex query with `&trace=1`, e.g. [`foobar(...) patterntype:structural`](https://sourcegraph.test:3443/search?q=context%3Aglobal+foobar%28...%29&patternType=structural&trace=1)—this will show the `View trace` button in the search results.
Use `sg start` to start services, and run a complex query with `&trace=1`, e.g. [`foobar\(\w+\) patterntype:regexp`](https://sourcegraph.test:3443/search?q=context%3Aglobal+foobar%28...%29&patternType=regexp&trace=1)—this will show the `View trace` button in the search results.
When using different backends, you can use `"urlTemplate"` in `"observability.tracing"` to configure the link.