MCPcopy Index your code
hub / github.com/github/docs / getIndexPrefix

Function getIndexPrefix

middleware/api/search.js:54–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52)
53
54function getIndexPrefix() {
55 // This logic is mirrored in the scripts we use before running tests
56 // In particular, see the `index-test-fixtures` npm script.
57 // That's expected to be run before CI and local jest testing.
58 // The reason we have a deliberately different index name (by prefix)
59 // for testing compared to regular operation is to make it convenient
60 // for engineers working on local manual testing *and* automated
61 // testing without have to re-index different content (e.g. fixtures
62 // vs real content) on the same index name.
63 if (process.env.NODE_ENV === 'test') return 'tests_'
64
65 return ''
66}
67
68function convertLegacyVersionName(version) {
69 // In the olden days we used to use `?version=3.5&...` but we decided

Callers 2

search.jsFile · 0.85
validationMiddlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected