mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
Code AI platform with Code Search & Cody
The bug fix in #57719 (backported in #57720) fixed support for the common case, a JSON object `privateMetadata`, but the GraphQL schema describes that any valid JSON should be accepted, and GraphQL validation permits primitives like `string`:  This change improves on #57719 with support for arbitrary types in case they get submitted. Similar to #57719, this is not a customer-affecting bug today as there are no usages, but it is important we land this fix to minimize the impact of this bug as we introduce usages like https://github.com/sourcegraph/cody/pull/1192. The diff is mostly tests, as the fix is fairly minimal. ## Test plan - [x] Updated unit tests assert that the GraphQL library we use does indeed accept incoming types as the equivalent Go type in `JSONValue.Value` - [x] Updated unit tests assert that marshalling of arbitrary types to proto works as expected - [x] Manual testing with `sg start` demonstrates GraphQL requests with arbitrary `privateMetadata` types are accepted:    |
||
|---|---|---|
| .aspect | ||
| .buildkite | ||
| .github | ||
| .vscode | ||
| client | ||
| cmd | ||
| dev | ||
| doc | ||
| docker-images | ||
| internal | ||
| lib | ||
| migrations | ||
| monitoring | ||
| schema | ||
| src-tauri | ||
| testing | ||
| third_party | ||
| third-party-licenses | ||
| ui/assets | ||
| windows/installer/cody | ||
| wolfi-images | ||
| wolfi-packages | ||
| .bazel_fix_commands.json | ||
| .bazelignore | ||
| .bazeliskrc | ||
| .bazelrc | ||
| .bazelversion | ||
| .browserslistrc | ||
| .dockerignore | ||
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc.js | ||
| .gitattributes | ||
| .gitignore | ||
| .graphqlrc.yml | ||
| .hadolint.yaml | ||
| .mailmap | ||
| .mocharc.js | ||
| .npmrc | ||
| .percy.yml | ||
| .pre-commit-config.yaml | ||
| .prettierignore | ||
| .stylelintignore | ||
| .stylelintrc.json | ||
| .tool-versions | ||
| .trivyignore | ||
| babel.config.jest.js | ||
| babel.config.js | ||
| BUILD.bazel | ||
| CHANGELOG.app.md | ||
| CHANGELOG.md | ||
| CODENOTIFY | ||
| CONTRIBUTING.md | ||
| deps.bzl | ||
| doc.go | ||
| eslint-relative-formatter.js | ||
| flake.lock | ||
| flake.nix | ||
| gen.go | ||
| go.mod | ||
| go.sum | ||
| graphql-schema-linter.config.js | ||
| gulpfile.js | ||
| jest.config.base.js | ||
| jest.config.js | ||
| jest.snapshot-resolver.js | ||
| LICENSE | ||
| LICENSE.enterprise | ||
| linter_deps.bzl | ||
| mockgen.temp.yaml | ||
| mockgen.test.yaml | ||
| mockgen.yaml | ||
| nogo_config.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| postcss.config.js | ||
| prettier.config.js | ||
| README.md | ||
| renovate.json | ||
| SECURITY.md | ||
| service-catalog.yaml | ||
| sg.config.yaml | ||
| shell.nix | ||
| sonar-project.properties | ||
| stamp_tags.bzl | ||
| svgo.config.js | ||
| tsconfig.all.json | ||
| tsconfig.base.json | ||
| tsconfig.eslint.json | ||
| WORKSPACE | ||
Docs •
Contributing •
Twitter •
Discord
Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.
- Code search: Search all of your repositories across all branches and all code hosts.
- Code intelligence: Navigate code, find references, see code owners, trace history, and more.
- Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.
Getting started
- Download Sourcegraph for macOS and Linux
- Use Sourcegraph on the cloud or self-hosted
- Sourcegraph.com public code search
Development
Refer to the Developing Sourcegraph guide to get started.
Documentation
The doc directory has additional documentation for developing and understanding Sourcegraph:
- Project FAQ
- Architecture: high-level architecture
- Database setup: database best practices
- Go style guide
- Documentation style guide
- GraphQL API: useful tips when modifying the GraphQL API
- Contributing
License
This repository contains primarily non-OSS-licensed files, and some OSS licensed files (for example, IDE extensions). We maintain one repository rather than two separate repositories mainly for development convenience.
See the LICENSE for an explanation of how files are licensed.