mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
This is part of the Keyword GA Project. Batch Changes uses Sourcegraph queries to define the list of repositories on which the batch change will run. With this change we default to pattern type "keyword" instead of "standard". To make this a backward compatible change, we also introduce a version identifier to batch specs. Authors can specify `version: 2` in the spec, in which case we default to pattern type "keyword". Existing specs (without a specified version) and specs with `version: 1` will keep using pattern type "standard". Notes: - Corresponding doc update [PR](https://github.com/sourcegraph/docs/pull/477) - We don't have a query input field, but instead the query is defined in a batch spec YAML. It didn't feel right to edit the YAML and append "patternType: " on save, which is what we do for Code Monitors and Insights. - I misuse the pattern type query parameter to effectively override the version. Once we introduce "V4" we should come back here and clean up. I left a TODO in the code. Test plan: - New and updated unit tests - manual testing - new batch changes use `version: 2` by default. - using an unsupported version returns an error - I ran various "on:" queries to verify that version 2 uses keyword search and version 1 uses standard search. |
||
|---|---|---|
| .. | ||
| accesstoken | ||
| api | ||
| background | ||
| batches | ||
| cliutil | ||
| codeintel | ||
| enterpriseportal | ||
| errors | ||
| gitservice | ||
| iterator | ||
| managedservicesplatform | ||
| output | ||
| pointers | ||
| process | ||
| redislock | ||
| servicecatalog | ||
| telemetrygateway | ||
| buf.yaml | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
| tools.go | ||
Sourcegraph lib module
This directory is the root of a separate go module from the primary module rooted at sourcegraph/sourcegraph. This module exists to hold code that we want to reuse outside of the sourcegraph/sourcegraph repo.
Code in this module should not import from sourcegraph/sourcegraph or from other Sourcegraph repositories to avoid complicated dependency relationships. Instead consider moving code from elsewhere into this module.