diff --git a/README.md b/README.md index aa6f40ba1..9b1cdbc4d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Sourcegraph Docs - + Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack. diff --git a/docs.config.js b/docs.config.js index 7e57e782d..c6260bc43 100644 --- a/docs.config.js +++ b/docs.config.js @@ -1,5 +1,5 @@ const config = { - DOCS_LATEST_VERSION: '6.1' + DOCS_LATEST_VERSION: '6.2' }; module.exports = config; diff --git a/docs/admin/config/batch_changes.mdx b/docs/admin/config/batch_changes.mdx index 0da626424..abe9c6dba 100644 --- a/docs/admin/config/batch_changes.mdx +++ b/docs/admin/config/batch_changes.mdx @@ -30,11 +30,11 @@ To restore the default behavior, you can either delete the `batchChanges.rollout Or, to put it another way: -| `batchChanges.rolloutWindows` configuration | Behavior | -|---------------------------------------------|-----------| -| Omitted, or set to `null` | Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. | +| `batchChanges.rolloutWindows` configuration | Behavior | +| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Omitted, or set to `null` | Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. | | Set to an array (even if empty) | Changesets will be reconciled using the rate limit in the current window using [the leaky bucket behavior described below](#leaky-bucket-rate-limiting). If no window covers the current period, then no changesets will be reconciled until a window with a non-zero [`rate`](#rate) opens. | -| Any other value | The configuration is invalid, and an error will appear. | +| Any other value | The configuration is invalid, and an error will appear. | #### Leaky bucket rate limiting @@ -171,18 +171,53 @@ For those that require a separate API call, Batch Changes will only be able to d Refer to the table below to see the levels with which each code host is supported: -Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note ---------- | --------- | :-: | :-: | ---- -Azure DevOps | Changeset property | ✓ | ✗ | -Bitbucket Cloud | Changeset property | ✓ | ✓ | -Bitbucket Server | API call | ✓ | ✓ | -GitHub | API call | ✓ | ✓ | -GitLab | Changeset property | ✓ | ✓ | -Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum + Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note +---------------- | ---------------------------------------- | :--------------: | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------- +Azure DevOps | Changeset property | ✓ | ✗ | +Bitbucket Cloud | Changeset property | ✓ | ✓ | +Bitbucket Server | API call | ✓ | ✓ | +GitHub | API call | ✓ | ✓ | +GitLab | Changeset property | ✓ | ✓ | +Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum -## Commit signing for GitHub +## Commit signing - The feature is currently in Beta stage and supported on Sourcegraph versions 5.1 or more. +Batch Changes supports commit signing with both GitHub apps and with SSH keys. + +### Commit signing with SSH keys (GitLab and GitHub) + +Commit signing with SSH keys is currently Experimental and is supported only with Sourcegraph v6.2 or more. + +Commit signing with SSH keys can only be combined with a personal or fine-grained access token. + +Sourcegraph can be configured to sign commits using SSH keys with user and site admin credentials. + +To enable **commit signing for your Batch Changes user**, navigate to **Settings > Batch Changes** and click **Add credentials** for a GitHub or GitLab code host. + +![List of code hosts with an arrow pointing to add credential](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/code_host_add_credential.png) + +If you already have a credential for the given code host, remove it first. + +Enter your personal access token, and check the "Sign commits on this code host" box. This will add a step to the setup flow. Click "Next" and wait for Batch Changes to verify the access token. + +![The modal for adding a credential with an arrow pointing to the checkbox for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_checkbox.png) + +Once the credential is added, you can copy the public SSH key Batch Changes will use to sign commits. You can view the public key anytime by clicking **View Credentials**. + +![The modal displays the ssh key used for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_view_ssh_key.png) + +Add this public SSH key to your [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) or [GitLab](https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account) account. +Make sure you add it as a signing key. + +![Add the key to your code host as a signing key](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/github_add_signing_key.png) + +To enable **commit signing as a site admin**, navigate to **Site Admin > Section: Batch Changes > Settings** and click **Add credentials** for a GitHub or GitLab code host. The rest of the setup is the same as above. + +![Site admin settings for batch changes](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/batch_changes_site_admin_settings.png) + +### Commit signing with GitHub apps + +Commit signing with GitHub apps is currently in Beta and is supported with Sourcegraph v5.1 or more. Sourcegraph can be configured to [sign commits pushed to GitHub](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) using a GitHub App. Commit signing prevents tampering by unauthorized parties and provides a way to ensure that commits pushed to branches created by Batch Changes actually do come from Sourcegraph. Enabling commit signing for Batch Changes can also help pass checks in build systems or CI/CD pipelines that require that all commits are signed and verified before they can be merged. @@ -306,3 +341,32 @@ When a user is deleted, their Batch Changes become inaccessible in the UI but th This allows recovering the Batch Changes if the user is restored. However, if the user deletion is permanent, deleting both account and data, then the associated Batch Changes are also permanently deleted from the database. This frees storage space and removes dangling references. + +## Batch Spec Library + + Batch Spec Library is currently in Experimental. + +The Batch Spec Library is a collection of Batch Specs that can be used to create Batch Changes. Sourcegraph provides a few Batch Specs out of the box. + +Site admins can manage the library through the GraphQL mutations `createBatchSpecLibraryRecord`, `updateBatchSpecLibraryRecord`, and `deleteBatchSpecLibraryRecord`. Use the query `batchSpecLibrary` to list all available Batch Spec examples. + +```graphql +createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example") { + id +} + +updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2") { + id +} + +deleteBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4") { + alwaysNil +} + +batchSpecLibrary(first: 100) { + nodes { + id + name + } +} +``` diff --git a/docs/batch-changes/configuring-credentials.mdx b/docs/batch-changes/configuring-credentials.mdx index 2fa691269..52ec0cd95 100644 --- a/docs/batch-changes/configuring-credentials.mdx +++ b/docs/batch-changes/configuring-credentials.mdx @@ -101,13 +101,70 @@ Let's learn how you can do it for different code hosts. ### GitHub -On GitHub.com, [create a personal access token (classic) with the correct scopes](https://github.com/settings/tokens/new?scopes=repo,read:org,user:email,read:discussion,workflow). +On GitHub.com, create a personal access token or fine-grained access token with the correct scopes. The `workflow` scope is technically only required if your batch changes modify files in the `.github` directory of a repository. Still, it's recommended to enable it regardless to avoid confusing errors at a later time. When working with organizations that have SAML SSO (Single Sign On) enabled, configuring credentials requires an additional step that [involves white-listing the token for use in that organization](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). -At present, only classic personal access tokens (PATs) are supported. Alternative token types like OAuth access tokens (e.g., OAuth apps), and fine-grained personal access tokens (PATv2) are not supported. +Currently, classic and fine-grained access tokens are supported only. Alternative token types like OAuth access tokens (for example, OAuth apps) are not supported. + +#### Personal Access Token + +Personal access tokens will have access to all repositories you have access to. + +[Click here to prefill the form](https://github.com/settings/tokens/new?scopes=repo,read:org,user:email,read:discussion,workflow). + +Required Scopes: + +- `repo` +- `read:org` +- `user:email` +- `read:discussion` +- `workflow` + +#### Fine-Grained Access Token + +Fine-grained access tokens allow more granular control of what actions can be performed for a given set of repositories. Most notably, fine-grained access tokens don't grant access by default to all repositories you have access to. + +In contrast to personal access tokens, fine-grained access tokens for organization resources may be restricted, may have an expiration, and may require approval. + +- **Restriction**: If an administrator of your GitHub organization has restricted access via fine-grained access tokens, you may not be able to use them for Batch Changes +- **Expiration**: If your organization has configured fine-grained access tokens to have maximum lifetimes, you may need to recreate the token when it has expired +- **Approval**: If your organization has configured fine-grained access tokens to require approval, you may need to wait for an administrator to approve the token before you can use it with Batch Changes + +Start by navigating to create a [new fine-grained access token](https://github.com/settings/personal-access-tokens/new). + +Pick the resource owner that owns the repositories you want to use with Batch Changes. This will likely be your company's GitHub organization. + +![Select resource owner for fine-grained access token](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_select_owner.png) + +Scroll down and select "All repositories" so that your token can access all current and future repositories that you have access to. You may restrict it to "Only select repositories", but you may have to generate a new token when you want to handle a new repository with Batch Changes. + +![Select all repositories for repository access](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_select_repos.png) + +Under "Permissions," click on the arrows on the right-hand side to expand the list of repository and organization permissions. + +![Expand the repository permissions by clicking on the arrows](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_expand_permissions.png) + +Under "Repository permissions", select the following permissions: + +- Contents: Read and write +- Metadata: Read-only +- Pull requests: Read and write +- Workflows: Read and write + +Under "Organization permissions", select the following permissions: + +- Custom properties: Read-only + +Once you created the token, copy it and add it to your Batch Changes credentials. + +![Add credential modal with fine-grained token selected](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_fine_grained_access_token.png) + +If your organization requires approval for fine-grained access tokens, you must wait for an administrator to approve the token before you can publish changesets with it. + +The fine-grained access token is now ready to use. Create a new batch change to start using it. ### GitHub Enterprise @@ -129,7 +186,7 @@ When working with organizations that have SAML SSO (Single Sign On) enabled, con Currently, for customers on an instance of GitHub Enterprise Cloud that uses [SSH certificate authorities](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities) and requires SSH certificates to authenticate, we are unable to provide a means of authenticating Batch Changes to your code host. -At present, only classic personal access tokens (PATs) are supported. Alternative token types like OAuth access tokens (e.g. OAuth apps), and fine-grained personal access tokens (PATv2) are not supported. +Currently, classic personal and fine-grained access tokens are supported only. Alternative token types like OAuth access tokens (for example, OAuth apps) are not supported. ### GitLab @@ -239,4 +296,4 @@ To remove a GitHub app from your Sourcegraph instance, navigate back to the same -If you want to delete the GitHub app entirely you have to navigate to [GitHub's list of applications](https://github.com/settings/apps/), and delete it from there. \ No newline at end of file +If you want to delete the GitHub app entirely, you have to navigate to [GitHub's list of applications](https://github.com/settings/apps/) and delete it from there. diff --git a/docs/batch-changes/create-a-batch-change.mdx b/docs/batch-changes/create-a-batch-change.mdx index 64a7c4bd1..e1aed0843 100644 --- a/docs/batch-changes/create-a-batch-change.mdx +++ b/docs/batch-changes/create-a-batch-change.mdx @@ -140,7 +140,7 @@ You should see the editor view now. This view consists of three main areas: ![ssbc_editor_panels](https://sourcegraphstatic.com/docs/images/batch_changes/2024/ssbc_editor_panels.png) -You can pick from the examples in the library pane to get started quickly or begin working on your batch spec in the editor right away. The editor will provide documentation as you hover over tokens in the YAML spec and supports auto-completion. +You can pick from the examples in the library pane to get started quickly or begin working on your batch spec in the editor right away. Site admins can configure the examples. The editor will provide documentation as you hover over tokens in the YAML spec and supports auto-completion. ### Previewing workspaces @@ -180,6 +180,14 @@ You can view a list by clicking the **Batch Changes** icon in the top navigation ![batch-change-icon-to-view](https://sourcegraphstatic.com/docs/images/batch_changes/2024/batch_changes_icon_in_menu.png) +### Title-based search + +You can search through your previously created batch changes by title. This search experience makes it much easier to find the batch change you’re looking for, especially when you have large volumes of batch changes to monitor. + +Start typing the keywords that match the batch change’s title, and you will see a list of relevant results. + +![title-based-search-batch-changes](https://storage.googleapis.com/sourcegraph-assets/Docs/title-based-search-bc.png) + ## Filtering Batch Changes You can also use the filters to switch between showing all open or closed Batch Changes. diff --git a/docs/batch-changes/rebasing-changesets.mdx b/docs/batch-changes/rebasing-changesets.mdx new file mode 100644 index 000000000..ed2c38446 --- /dev/null +++ b/docs/batch-changes/rebasing-changesets.mdx @@ -0,0 +1,36 @@ +# Rebasing changesets + +

Learn how to rebase your existing changesets.

+ +This feature is supported for Sourcegraph versions 6.2 or more. + +If your codehost requires changesets to be up to date with the main branch, you can use the rebase functionality of the Web UI to update the changesets. + +Rebasing does not resolve merge conflicts. + +## Requirements + +- Sourcegraph instance with repositories in it. See the [Quickstart](/#quick-install) guide on how to set up a Sourcegraph instance +- A [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) for Batch Changes (**a personal access token cannot currently be used for importing changesets**) + +## Select changesets to rebase + +After navigating to the changesets of your batch change, select one or more **published** changesets to rebase. You can only rebase changesets after they have been published to the codehost. + +![List of changesets with two of them selected](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_changesets.png) + +If a changeset is already up to date with the main branch, rebasing will result in no changes. + +## Start the rebase bulk operation + +With all applicable changesets selected, click the **Select action** button, and then select **Rebase changesets**. + +![List of changesets and dropdown overlay](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_dropdown.png) + +Confirm the popup to start the rebase bulk operation. + +![Popup to confirm rebase action](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_confirm.png) + +You can see the progress of the rebase operation in the **Bulk Actions** tab. + +![List of bulk operations showing that rebase has completed](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_status.png) diff --git a/docs/batch-changes/site-admin-configuration.mdx b/docs/batch-changes/site-admin-configuration.mdx index b7cbb95ba..57ef2a0f2 100644 --- a/docs/batch-changes/site-admin-configuration.mdx +++ b/docs/batch-changes/site-admin-configuration.mdx @@ -17,6 +17,7 @@ Using Batch Changes requires a [code host connection](/admin/external_services/) - [Outgoing webhooks](/admin/config/webhooks/outgoing), which publish events related to batch changes and changesets to enable deeper integrations with your other tools and systems - [Auto-delete branch on merge/close](/admin/config/batch_changes#automatically-delete-branches-on-merge-close), which automatically deletes branches created by Batch Changes when changesets are merged or closed - [Commit signing for GitHub](/admin/config/batch_changes#commit-signing-for-github), which signs commits created by Batch Changes via a GitHub App (Beta) + - [Batch spec library](/admin/config/batch_changes#batch-spec-library), which help your users write batch specs and follow best practices ## Disable Batch Changes diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 843e6e7c8..345d284b6 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -95,6 +95,32 @@ You get the following improvements: - **Reworked fuzzy finder ⌘K**: Find files and symbols quickly and easily with our whole new fuzzy finder - **File actions**: Like open in editor and open on code host +## Personalized search ranking + +Sourcegraph Enterprise users can get more personalized and better-ranked search results in the search bar for their codebases. With this feature, you get: + +- Improved ranking for keyword searches like "data router". This capability is enabled by default and cannot be configured +- Personalized ranking, specifically boosted results from repos you recently contributed to. This is controlled by the setting `experimentalFeatures.boostRelevantRepositories` + +These boosted results from your recently contributed repositories make finding the code you care about easier. + +The personalized search ranking works best if you have large codebases, especially for new users who may otherwise get overwhelmed by results from unfamiliar or irrelevant repositories. + +Personalized search ranking is enabled by default, but you can disable it from your settings via: + +```json +experimentalFeatures: { + boostRelevantRepositories: false +} +``` + +Here is an example of search results with personalized search ranking enabled: + +![search-ranking-enabled](https://storage.googleapis.com/sourcegraph-assets/Docs/personalized-search-rankings.png) + +As you can see, the results are now ranked based on their relevance to the query, and the results from repositories you've recently contributed to are boosted. + + ## Other search tips - When viewing a file or directory, press the `y` key to expand the URL to its canonical form (with the full 40-character Git commit SHA). diff --git a/docs/cody/capabilities/supported-models.mdx b/docs/cody/capabilities/supported-models.mdx index 902419758..4e63a014f 100644 --- a/docs/cody/capabilities/supported-models.mdx +++ b/docs/cody/capabilities/supported-models.mdx @@ -21,7 +21,19 @@ Cody supports a variety of cutting-edge large language models for use in chat an | Google | [Gemini 2.0 Flash](https://deepmind.google/technologies/gemini/flash/) | ✅ | ✅ | ✅ | | | | | | Google | [Gemini 2.0 Flash-Lite Preview](https://deepmind.google/technologies/gemini/flash/) (experimental) | ✅ | ✅ | ✅ | | | | | -To use Claude 3 Sonnet models with Cody Enterprise, make sure you've upgraded your Sourcegraph instance to the latest version. Claude 3.7 Sonnet with thinking is not supported for BYOK deployments. +To use Claude 3 Sonnet models with Cody Enterprise, make sure you've upgraded your Sourcegraph instance to the latest version. + +### CLaude 3.7 Sonnet + +Claude 3.7 has two variants — Claude 3.7 Sonnet and Claude 3.7 Extended Thinking — to support deep reasoning and fast, responsive edit workflows. This means you can use Claude 3.7 in different contexts depending on whether long-form reasoning is required or for tasks where speed and performance are a priority. + +Claude 3.7 Extended Thinking version will be the recommended default chat model for Cloud customers. Self-hosted customers are encouraged to follow this recommendation, as Claude 3.7 outperforms 3.5 in most scenarios. + +#### Claude 3.7 for GCP + +In addition, Sourcegraph Enterprise customers using GCP vertex (Google Cloud Platform) for Claude models can use both these variants of Claude 3.7 to optimize extended reasoning and deeper understanding. Customers using AWS Bedrock doesn't have Claude 3.7 Extended Thinking variant. + +Claude 3.7 Sonnet with thinking is not supported for BYOK deployments. ## Autocomplete diff --git a/docs/cody/enterprise/features.mdx b/docs/cody/enterprise/features.mdx index 27a04b4cf..9dcb4bd47 100644 --- a/docs/cody/enterprise/features.mdx +++ b/docs/cody/enterprise/features.mdx @@ -10,7 +10,7 @@ Site administrators can set the duration of access tokens for users connecting C ## Guardrails -Guardrails for public code is currently in Beta and is supported with VS Code and JetBrains IDEs extensions. +Guardrails for public code is currently in Beta and is supported with VS Code, JetBrains IDEs extensions and Sourcegraph Web app. Open source attribution guardrails for public code, commonly called copyright guardrails, reduce the exposure to copyrighted code. This involves implementing a verification mechanism within Cody to ensure that any code generated by the platform does not replicate open source code. @@ -18,6 +18,10 @@ Guardrails for public code are available to all Sourcegraph Enterprise instances Guardrails don't differentiate between license types. It matches any code snippet that is at least **ten lines** long from the **290,000** indexed open source repositories. +### Guardrails `enforced` check + +You can `enforce` a Guardrails check to prevent any matching code from being shown to the user. To do so, site admins need to add `"attribution.mode": "enforced"` in the **Site configuration** setting. This will configure the settings for Cody IDE extensions VS Code (v1.82+) or JetBrains (v7.82+) accordingly and will enforce not to display code until attribution checks have finished. + ## Admin controls Admin controls are supported with VS Code and JetBrains IDE extension. diff --git a/docs/legacy.mdx b/docs/legacy.mdx index 9f2be6f6c..d557b177d 100644 --- a/docs/legacy.mdx +++ b/docs/legacy.mdx @@ -4,6 +4,7 @@ + - [6.1](https://6.1.sourcegraph.com) - [6.0](https://6.0.sourcegraph.com) diff --git a/public/llms.txt b/public/llms.txt index a05ce32f2..b2d83cfcd 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -5,6 +5,68 @@ This page documents all notable changes to Sourcegraph. For more detailed change {/* CHANGELOG_START */} +# 6.1 Patch 5 + +## v6.1.5633 + +- [sourcegraph](https://github.com/sourcegraph/sourcegraph/releases/tag/v6.1.5633) + +- [docker-compose](https://github.com/sourcegraph/deploy-sourcegraph-docker/releases/tag/v6.1.5633) + +- [helm](https://github.com/sourcegraph/deploy-sourcegraph-helm/releases/tag/v6.1.5633) + +- [kustomize](https://github.com/sourcegraph/deploy-sourcegraph-k8s/releases/tag/v6.1.5633) + +### Features + +#### Cody + +- Allow non-aws bedrock endpoints with Bedrock provider `(PR #4196)` + - Add AWS Bedrock client support for non-AWS Bedrock-compatible endpoints + Backport 9054d7c14db0ecf96200c2985c5b550b6dd2ded0 from #4145 + +### Reverts + + There were no reverts for this release + +### Uncategorized + +#### Others + +- feat(cody gateway): Update default chat model to Claude 3.7 Sonnet wi… `(PR #4207)` + - See [https://github.com/sourcegraph/sourcegraph/pull/4063](https://github.com/sourcegraph/sourcegraph/pull/4063) +- [Backport 6.1.x] Add thinking/chain-of-thought support for Anthropic models via Vertex AI `(PR #4202)` +- [Backport 6.1.x] bitbucket: Add support for subpath in cloneurl resolution `(PR #4195)` + +{/* RSS={"version":"v6.1.5633", "releasedAt": "2025-03-21"} */} + + +# 6.1 Patch 4 + +## v6.1.4020 + +- [sourcegraph](https://github.com/sourcegraph/sourcegraph/releases/tag/v6.1.4020) + +- [docker-compose](https://github.com/sourcegraph/deploy-sourcegraph-docker/releases/tag/v6.1.4020) + +- [helm](https://github.com/sourcegraph/deploy-sourcegraph-helm/releases/tag/v6.1.4020) + +- [kustomize](https://github.com/sourcegraph/deploy-sourcegraph-k8s/releases/tag/v6.1.4020) + +### Features + +#### Source + +- sub-repo-perms: add limited support for IPv4 wildcard semantics `(PR #4018)` + - Backport 04606e20fbc8f13ad473533820b8f5df71e20ad7 from #3989 + +### Reverts + + There were no reverts for this release + +{/* RSS={"version":"v6.1.4020", "releasedAt": "2025-03-12"} */} + + # 6.1 Patch 3 ## v6.1.2889 @@ -7959,7 +8021,10 @@ Currently supported versions of Sourcegraph: | **Release** | **General Availability Date** | **Supported** | **Release Notes** | **Install** | |--------------|-------------------------------|---------------|--------------------------------------------------------------------|------------------------------------------------------| -| 6.1 Patch 1 | February 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v61376) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.1 Patch 4 | March 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v614020) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.1 Patch 3 | March 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v612889) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.1 Patch 2 | February 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v611295) | [Install](https://sourcegraph.com/docs/admin/deploy) | +| 6.1 Patch 1 | February 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v61376) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.1 Patch 0 | February 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v610) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.0 Patch 1 | February 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v602687) | [Install](https://sourcegraph.com/docs/admin/deploy) | | 6.0 Patch 0 | January 2025 | ✅ | [Notes](https://sourcegraph.com/docs/technical-changelog#v600) | [Install](https://sourcegraph.com/docs/admin/deploy) | @@ -8028,6 +8093,7 @@ These versions fall outside the release lifecycle and are not supported anymore: + - [6.1](https://6.1.sourcegraph.com) - [6.0](https://6.0.sourcegraph.com) @@ -8412,7 +8478,7 @@ Slack Support provides access to creating tickets directly from Slack, allowing | Integrated search results | - | ✓ | ✓ | | Prompt Library | ✓ | ✓ | ✓ | | Bring your own LLM Key | - | - | Self-Hosted only | -| Auto-edit | - | Experimental | Experimental | +| Auto-edit | - | Beta | Beta | | Aentic chat experience | - | Experimental | Experimental | | **Code Search** | | | | | Code Search | - | ✓ | ✓ | @@ -8445,9 +8511,9 @@ Slack Support provides access to creating tickets directly from Slack, allowing -# Pricing and Billing FAQs +# FAQs -

Learn about billing and pricing FAQs for Sourcegraph plans.

+

Learn about some of the most commonly asked questions about Sourcegraph.

## What's the difference between Free, Enterprise Starter, and Enterprise plans? @@ -8503,6 +8569,25 @@ Pro and Enterprise Starter plans are billed monthly and can be paid with a credi ‍A billable user is one who is signed in to their Enterprise account and actively interacts with the product (e.g., they see suggested autocompletions, run commands or chat with Cody, start new discussions, clear chat history, or copy text from chats, change settings, and more). Simply having Cody installed is not enough to be considered a billable user. +## How are active users calculated for Sourcegraph Code Search and Code Intelligence Platform? + +A billable active Code Search or Code Intelligence Platform user is signed into and accesses Sourcegraph. This includes but is not limited to: + +- Visiting the Sourcegraph web application or using a browser extension, editor extension, or other client while signed in +- Conducting a search in the Sourcegraph UI or extension +- Hovering and navigating code in the Sourcegraph UI or extension +- Viewing a file or repository in Sourcegraph +- Creating, viewing, or receiving a code monitor +- Creating, viewing, modifying, or applying a batch change +- Creating, viewing, or modifying a code insight +- Creating, viewing, or modifying a search notebook + +## How is this measured in the product? + +A user who has accessed a Sourcegraph product is counted as active once they complete an action that represents usage reflected above. + +User counts and usage metrics are in [Sourcegraph Analytics](../analytics). + ## Is my data secure when connected to Code Search? Sourcegraph has security and reliability controls built for the most demanding enterprises. To learn more, see our [Security page](https://sourcegraph.netlify.app/security). @@ -8547,6 +8632,19 @@ We don't offer refunds, but if you have any queries regarding the Enterprise Sta
+ +# Sourcegraph Pricing Plans + +

Sourcegraph offers three different pricing plans based on your needs.

+ + + + + + + +
+ # Free @@ -11360,13 +11458,14 @@ To use Sourcegraph on your own (private) code, [use Sourcegraph Cloud](/cloud/) -# Cody Pricing +# Cody Pricing Plans

Learn about the different plans available for Cody.

Cody provides three subscription plans: **Free**, **Pro**, and **Enterprise**. Each plan is aimed to cater to a diverse range of users, from individual projects to large-scale enterprises. Cody Free includes basic features, while the Pro and Enterprise plans offer additional advanced features and resources to meet varying user requirements. -## Free + + The free plan is designed for individuals to get started with Cody. It comes with a set of features to enhance your coding experience. It includes **unlimited autocompletion suggestions** per month, covering both whole and multi-line suggestions. You also get **200 chats/prompts** per month with access to creating custom prompts. @@ -11395,7 +11494,9 @@ To upgrade from Cody Free to Pro: Once your Pro subscription is confirmed, click **My subscription** to manage and view your activation details, or click **Dashboard** for the overall view. -## Pro + + + Cody Pro, designed for individuals or small teams at **$9 per user per month**, offers an enhanced coding experience beyond the free plan. It provides unlimited autocompletion suggestions plus increased limits for chat and prompts. It also uses local repository context to enhance Cody's understanding and accuracy. @@ -11454,12 +11555,46 @@ Cody Pro users can also switch to the Enterprise Starter plan for **$19 per user Read more about the [Enterprise Starter plan](/pricing/enterprise-starter). -## Enterprise + + + Cody Enterprise is designed for enterprises prioritizing security and administrative controls. We offer either seat-based or token based pricing models, depending on what makes most sense for your organization. You get Claude Haiku 3.5 and Claude Sonnet 3.5 as the default LLM models without extra cost. You also get additional capabilities like BYOLLM (Bring Your Own LLM), supporting Single-Tenant and Self Hosted setups for flexible coding environments. Security features include SAML/SSO for enhanced authentication and guardrails to enforce coding standards. Cody Enterprise supports advanced Code Graph context and multi-code host context for a deeper understanding of codebases, especially in complex projects. With 24/5 enhanced support, Cody Enterprise ensures timely assistance. +## Billing FAQs for Cody Enterprise + +### How are active users calculated for Cody? + +### Billable active users + +This only applies to Enterprise Cody users. Cody Pro users pay for a seat every month, regardless of usage. + +A billable active Cody user is signed in to their Enterprise Sourcegraph account and actively interacts with Cody (for example, they see suggested autocompletions, run commands, or chat with Cody, they start new discussions, clear chat history, or copy text from chats. They change Cody's settings and more). + +Having Cody installed and signing in is not enough to be considered a billable user. + +Specific categories of user actions that qualify as active Cody usage for billing include, but are not limited to: + +- Signing in to Cody in an editor +- Seeing suggested autocompletions and/or accepting/rejecting them +- Running commands or chatting with Cody +- Starting new chats, clearing chat history, copying text from chats or otherwise interacting with the Cody chat interface in the editor or on the web +- Adding or changing context in a Cody chat interface or changing models +- Interacting with Cody tutorials +- Changing Cody personal or team settings + +### Authenticated users + +An authenticated Cody user is authenticated (or signed in) to Cody in their editor within a given time period. This includes all users who interact with Cody on the web. + +Authenticated users are a superset of [billable users](#billable-active-users) defined above. They include users who are signed in but do not actively engage with Cody. + + + + + ## Plans Comparison The following table shows a high-level comparison of the three plans available on Cody. @@ -16521,7 +16656,7 @@ Alternately, you may need to set up a periodic CI job, specifically designed to The Cody extension by Sourcegraph enhances your coding experience in VS Code by providing intelligent code suggestions, context-aware autocomplete, and advanced code analysis. This guide will walk you through the steps to install and set up Cody within your VS Code environment. - + ## Prerequisites @@ -16895,12 +17030,12 @@ To add/remove an account you can do the following:

Learn how to use Cody and its features with the Visual Studio editor.

-Cody for Visual Studio is currently in the Experimental stage and currently only supports chat. +Cody for Visual Studio is currently in the Experimental stage and currently supports chat and autocomplete. Cody extension for Visual Studio enhances your coding experience by providing intelligent and contextually aware answers to your questions. This guide will walk you through installing and setting Cody within your Visual Studio editor. - + ## Prerequisites @@ -17106,7 +17241,7 @@ The `sg.nvim` extension also supports pre-built reusable prompts for Cody called The Cody plugin by Sourcegraph enhances your coding experience in your IDE by providing intelligent code suggestions, context-aware completions, and advanced code analysis. This guide will walk you through the steps to install and set up Cody within your JetBrains environment. - + ## Prerequisites @@ -17378,7 +17513,7 @@ You can find and discover all Cody features and actions using the **Search Every

Learn how to use Cody and its features with the Eclipse editor.

-Cody for Eclipse is currently in the Experimental stage. It is compatible with Eclipse version 2024-03 (4.31.0) and runs on Windows 11. At this time, it only supports chat functionality. +Cody for Eclipse is currently in the Experimental stage and supports only chat. It is compatible with Eclipse version 2024-03 (4.31.0) and runs on Windows 11. The support is also limited feel free to contact us for any questions or feedback. Cody extension for Eclipse enhances your coding experience by providing intelligent and contextually aware answers to your questions. This guide will walk you through installing and setting Cody within your Eclipse editor. @@ -17868,7 +18003,7 @@ There are two ways of configuring Cody for LLM providers: In addition to the Cody extensions for [VS Code](/cody/clients/install-vscode), [JetBrains](/cody/clients/install-jetbrains), and [Visual Studio](/cody/clients/install-visual-studio ) IDEs, Cody is also available in the Sourcegraph web app. Community users can use Cody for free by logging into their accounts on Sourcegraph.com, and enterprise users can use Cody within their Sourcegraph instance. - + ## Initial setup @@ -18395,8 +18530,7 @@ Please refer to the [context providers docs](https://openctx.org/) for instructi {/* Internal docs only. Offloading from our production docs for now. */} - -Support with Ollama is currently in the Experimental stage and is available for Cody Free and Pro plans. +Compatibility with Ollama is currently in the Experimental stage and is available for Cody Free and Pro plans. The support is for Ollama is limited feel free to contact us for any questions or feedback. ## Cody Autocomplete with Ollama @@ -18886,7 +19020,7 @@ Cody uses a set of models for autocomplete. Learn more about these [here](/cody/

Auto-edit suggests code changes by analyzing cursor movements and typing. After you've made at least one character edit in your codebase, it begins proposing contextual modifications based on your cursor position and recent changes.

-Auto-edits is currently in experimental rollout within the VS Code extension. Access is limited to selected Enterprise Starter (Cody Pro) and Enterprise users on Cody Gateway. We will expand availability as we validate the feature's performance. +Auto-edit is currently supported in the VS Code extension with Sourcegraph v6.0+. It's available in Beta for Pro, Enterprise Starter and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can [disable the feature flag](#auto-edit-access-for-enterprise-customers) ## Capabilities of auto-edit @@ -18898,25 +19032,20 @@ Cody uses a set of models for autocomplete. Learn more about these [here](/cody/ ## Enabling auto-edit -Eligible Cody Pro users will gradually be given access to the auto-edit feature. Once you have it, you will receive an in-editor notification. +Auto-edit is enabled by default for Cody Pro Enterprise Starter, and Enterprise users. You can opt out and switch back to **autocomplete** by selecting it from the suggestion mode in the Cody VS Code extension settings. - +Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings. ### Auto-edit access for Enterprise customers Auto-edit is available for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps: 1. Site administrators must: - - Enable the feature flag `cody-autoedit-experiment-enabled-flag` + - Ensure the feature flag `cody-autoedit-experiment-enabled-flag` is enabled (enabled by default) - Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below) -2. Once enabled, developers will receive a notification in their editor to turn it on -3. If you skip the notification or don't see it, you can manually enable/disable it from the Cody extension settings. - -![enable-from-cody-settings](https://storage.googleapis.com/sourcegraph-assets/Docs/enable-auto-edit-from-settings.jpg) - -There is a drop-down menu for Cody's suggestions mode. You can choose between the default autocomplete and the auto-edit mode, or you can turn off the suggestions completely. +2. Once enabled, auto-edit will become the default suggestion mode for all users +3. Users can optionally switch back to autocomplete from the Cody extension settings +4. Site admins can opt out of auto-edits using the `cody-autoedit-experiment-enabled-flag` feature flag The following example demonstrates how to add Fireworks as an allowed LLM provider: @@ -18969,7 +19098,7 @@ The auto-edit feature can help you with various repetitive tasks in your code: - **Call site updates**: When you change a function's signature, auto-edit detects all locations where the function is called and suggests necessary modifications to match the new signature. This includes updating parameter orders, adding error handling, and adjusting return value usage. - **Test file maintenance**: Helps with repetitive updates in test files, such as modifying test assertions, updating mock objects, or changing test data structures. Auto-edit recognizes patterns from your recent changes and suggests similar modifications across related tests. - **Parameter refactoring**: Assists in adding, removing, or reorganizing function parameters. When you unpack a function to handle more cases, auto-edit helps restructure the parameter list and suggests corresponding changes at call sites. -- **Type system modifications**: When updating type definitions or interfaces, auto-edit identifies and suggests consistent changes across your codebase. This includes updating variable declarations, function parameters, and return types to maintain type consistency. +- **Type system modifications**: Auto-edit identifies and suggests consistent changes across your codebase when updating type definitions or interfaces. This includes updating variable declarations, function parameters, and return types to maintain type consistency.
@@ -21944,7 +22073,7 @@ Search-based code navigation uses exact matches `^foo$` and the symbols sidebar

Learn and understand about Sourcegraph's Structural Search and core functionality.

- Changed in version 5.3. Structural search is disabled by default. To enable it, ask your site administrator to set `experimentalFeatures.structuralSearch = "enabled" in site configuration. To make sure this functions properly, make sure you have "structuralSearch" : "enabled" nested within "experimentalFeatures". + Changed in version 5.3. Structural search is disabled by default. To enable it, ask your site administrator to set experimentalFeatures.structuralSearch = "enabled" in site configuration. Structural search has performance limitations and is not actively developed. We recommend using regex search or a combination of [Search Jobs](./search-jobs.mdx) and custom scripts instead. Please reach out to [support@sourcegraph.com](mailto:support@sourcegraph.com) for guidance on alternative approaches. With structural search, you can match richer syntax patterns specifically in code and structured data formats like JSON. It can be awkward or difficult to match code blocks or nested expressions with regular expressions. To meet this challenge we've introduced a new and easier way to search code that operates more closely on a program's parse tree. We use [Comby syntax](https://comby.dev/docs/syntax-reference) for structural matching. Below you'll find examples and notes for this language-aware search functionality. @@ -26236,7 +26365,7 @@ For unsupported private connectivity methods, Sourcegraph offers connectivity vi ### Health monitoring, support, and SLAs - Instance performance and health [monitored](/admin/observability/) by our team's on-call engineers. -- [Support and SLAs](../sla/index.mdx). +- [Support and SLAs](../sla/). ### Backup and restore @@ -30427,6 +30556,7 @@ Using Batch Changes requires a [code host connection](/admin/external_services/) - [Outgoing webhooks](/admin/config/webhooks/outgoing), which publish events related to batch changes and changesets to enable deeper integrations with your other tools and systems - [Auto-delete branch on merge/close](/admin/config/batch_changes#automatically-delete-branches-on-merge-close), which automatically deletes branches created by Batch Changes when changesets are merged or closed - [Commit signing for GitHub](/admin/config/batch_changes#commit-signing-for-github), which signs commits created by Batch Changes via a GitHub App (Beta) + - [Batch spec library](/admin/config/batch_changes#batch-spec-library), which help your users write batch specs and follow best practices ## Disable Batch Changes @@ -30836,6 +30966,46 @@ For example, if only the [`changesetTemplate.title`](/batch-changes/batch-spec-y + +# Rebasing changesets + +

Learn how to rebase your existing changesets.

+ +This feature is supported for Sourcegraph versions 6.2 or more. + +If your codehost requires changesets to be up to date with the main branch, you can use the rebase functionality of the Web UI to update the changesets. + +Rebasing does not resolve merge conflicts. + +## Requirements + +- Sourcegraph instance with repositories in it. See the [Quickstart](/#quick-install) guide on how to set up a Sourcegraph instance +- A [global service account token](/batch-changes/configuring-credentials#global-service-account-tokens) for Batch Changes (**a personal access token cannot currently be used for importing changesets**) + +## Select changesets to rebase + +After navigating to the changesets of your batch change, select one or more **published** changesets to rebase. You can only rebase changesets after they have been published to the codehost. + +![List of changesets with two of them selected](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_changesets.png) + +If a changeset is already up to date with the main branch, rebasing will result in no changes. + +## Start the rebase bulk operation + +With all applicable changesets selected, click the **Select action** button, and then select **Rebase changesets**. + +![List of changesets and dropdown overlay](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_dropdown.png) + +Confirm the popup to start the rebase bulk operation. + +![Popup to confirm rebase action](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_confirm.png) + +You can see the progress of the rebase operation in the **Bulk Actions** tab. + +![List of bulk operations showing that rebase has completed](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/rebase_status.png) + +
+ # Quickstart @@ -31717,6 +31887,17 @@ However, [steps](/batch-changes/batch-spec-yaml-reference#steps-run) can run any - [Jira tickets](https://github.com/sourcegraph/batch-change-examples/blob/main/ticketing-systems/jira-tickets/README) - [GitHub issues](https://github.com/sourcegraph/batch-change-examples/blob/main/ticketing-systems/github-issues/README) +## Can I use GitHub/GitLab runners to automate my batch changes? +To an extent, yes, you can use GitHub Actions or GitLab CI/CD runners to automate Sourcegraph batch changes to allow you to trigger batch changes automatically after events like library updates or on a schedule. +The implementation requirements are network access where your CI/CD runners must be able to reach your Sourcegraph instance and have authentication through a Sourcegraph access token for API access along with appropriate permissions to create batch changes. + +If you'd want to implement this automation: + +The best way would be to contact your SRE/Infrastructure team to verify if your CI/CD runners can access your Sourcegraph instance and if access is not available, work with your SRE team to request this capability. +Once access is confirmed, you can proceed with implementing the automation + +However, this requires your CI/CD runners to have network access to your Sourcegraph instance. In many enterprise environments, this access may be restricted by default. + ## What happens to the preview page if the batch spec is not applied? Unapplied batch specs are removed from the database after **seven days**. @@ -32355,7 +32536,7 @@ You should see the editor view now. This view consists of three main areas: ![ssbc_editor_panels](https://sourcegraphstatic.com/docs/images/batch_changes/2024/ssbc_editor_panels.png) -You can pick from the examples in the library pane to get started quickly or begin working on your batch spec in the editor right away. The editor will provide documentation as you hover over tokens in the YAML spec and supports auto-completion. +You can pick from the examples in the library pane to get started quickly or begin working on your batch spec in the editor right away. Site admins can configure the examples. The editor will provide documentation as you hover over tokens in the YAML spec and supports auto-completion. ### Previewing workspaces @@ -32395,6 +32576,14 @@ You can view a list by clicking the **Batch Changes** icon in the top navigation ![batch-change-icon-to-view](https://sourcegraphstatic.com/docs/images/batch_changes/2024/batch_changes_icon_in_menu.png) +### Title-based search + +You can search through your previously created batch changes by title. This search experience makes it much easier to find the batch change you’re looking for, especially when you have large volumes of batch changes to monitor. + +Start typing the keywords that match the batch change’s title, and you will see a list of relevant results. + +![title-based-search-batch-changes](https://storage.googleapis.com/sourcegraph-assets/Docs/title-based-search-bc.png) + ## Filtering Batch Changes You can also use the filters to switch between showing all open or closed Batch Changes. @@ -32513,13 +32702,70 @@ Let's learn how you can do it for different code hosts. ### GitHub -On GitHub.com, [create a personal access token (classic) with the correct scopes](https://github.com/settings/tokens/new?scopes=repo,read:org,user:email,read:discussion,workflow). +On GitHub.com, create a personal access token or fine-grained access token with the correct scopes. The `workflow` scope is technically only required if your batch changes modify files in the `.github` directory of a repository. Still, it's recommended to enable it regardless to avoid confusing errors at a later time. When working with organizations that have SAML SSO (Single Sign On) enabled, configuring credentials requires an additional step that [involves white-listing the token for use in that organization](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on). -At present, only classic personal access tokens (PATs) are supported. Alternative token types like OAuth access tokens (e.g., OAuth apps), and fine-grained personal access tokens (PATv2) are not supported. +Currently, classic and fine-grained access tokens are supported only. Alternative token types like OAuth access tokens (for example, OAuth apps) are not supported. + +#### Personal Access Token + +Personal access tokens will have access to all repositories you have access to. + +[Click here to prefill the form](https://github.com/settings/tokens/new?scopes=repo,read:org,user:email,read:discussion,workflow). + +Required Scopes: + +- `repo` +- `read:org` +- `user:email` +- `read:discussion` +- `workflow` + +#### Fine-Grained Access Token + +Fine-grained access tokens allow more granular control of what actions can be performed for a given set of repositories. Most notably, fine-grained access tokens don't grant access by default to all repositories you have access to. + +In contrast to personal access tokens, fine-grained access tokens for organization resources may be restricted, may have an expiration, and may require approval. + +- **Restriction**: If an administrator of your GitHub organization has restricted access via fine-grained access tokens, you may not be able to use them for Batch Changes +- **Expiration**: If your organization has configured fine-grained access tokens to have maximum lifetimes, you may need to recreate the token when it has expired +- **Approval**: If your organization has configured fine-grained access tokens to require approval, you may need to wait for an administrator to approve the token before you can use it with Batch Changes + +Start by navigating to create a [new fine-grained access token](https://github.com/settings/personal-access-tokens/new). + +Pick the resource owner that owns the repositories you want to use with Batch Changes. This will likely be your company's GitHub organization. + +![Select resource owner for fine-grained access token](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_select_owner.png) + +Scroll down and select "All repositories" so that your token can access all current and future repositories that you have access to. You may restrict it to "Only select repositories", but you may have to generate a new token when you want to handle a new repository with Batch Changes. + +![Select all repositories for repository access](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_select_repos.png) + +Under "Permissions," click on the arrows on the right-hand side to expand the list of repository and organization permissions. + +![Expand the repository permissions by clicking on the arrows](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/fine_grained_expand_permissions.png) + +Under "Repository permissions", select the following permissions: + +- Contents: Read and write +- Metadata: Read-only +- Pull requests: Read and write +- Workflows: Read and write + +Under "Organization permissions", select the following permissions: + +- Custom properties: Read-only + +Once you created the token, copy it and add it to your Batch Changes credentials. + +![Add credential modal with fine-grained token selected](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_fine_grained_access_token.png) + +If your organization requires approval for fine-grained access tokens, you must wait for an administrator to approve the token before you can publish changesets with it. + +The fine-grained access token is now ready to use. Create a new batch change to start using it. ### GitHub Enterprise @@ -32541,7 +32787,7 @@ When working with organizations that have SAML SSO (Single Sign On) enabled, con Currently, for customers on an instance of GitHub Enterprise Cloud that uses [SSH certificate authorities](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities) and requires SSH certificates to authenticate, we are unable to provide a means of authenticating Batch Changes to your code host. -At present, only classic personal access tokens (PATs) are supported. Alternative token types like OAuth access tokens (e.g. OAuth apps), and fine-grained personal access tokens (PATv2) are not supported. +Currently, classic personal and fine-grained access tokens are supported only. Alternative token types like OAuth access tokens (for example, OAuth apps) are not supported. ### GitLab @@ -32651,7 +32897,8 @@ To remove a GitHub app from your Sourcegraph instance, navigate back to the same -If you want to delete the GitHub app entirely you have to navigate to [GitHub's list of applications](https://github.com/settings/apps/), and delete it from there. +If you want to delete the GitHub app entirely, you have to navigate to [GitHub's list of applications](https://github.com/settings/apps/) and delete it from there. + @@ -35163,6 +35410,46 @@ Coming soon. + +# Percentage of code written (PCW) by Cody + +In order to track Cody's impact, we measure the percentage of new code inserted into users’ editors that is generated by Cody. You can find this data in [Sourcegraph Analytics](https://analytics.sourcegraph.com). + +## What it measures + +This metric demonstrates how much Cody is contributing to your development process—providing both real productivity gains and improved product velocity. But it's just one of a many metrics we offer to measure Cody's impact on your development workflow. For more, refer to the ROI page in your Sourcegraph Analytics portal. + +## How it’s measured + +To calculate this metric we measure: + +1. Inserted code that Cody generates via: + +- Chat or prompt responses that are inserted into the editor +- Accepted autocompletions +- Suggestions/fixes + +2. Total new code inserted (which includes both user-generated and cody-generated code) + +We then create a simple ratio: + +`(Inserted code that Cody generates ÷ Total new code inserted) * 100 = Percentage of code written by Cody` + +_Note that components are measured in characters of code._ + +## Technical details + +When calculating this metric, we try to include only new code being written by the user or by Cody. This means we exclude insertions from, for example, pasting in large chunks of existing code from a different file, or pulling in changes via `git pull`. + +It’s simple to identify which code is generated by Cody, but much more difficult to tell the difference between user-written code and code added to the file from one of the above methods given the data available from VS Code, JetBrains, and other editors. To account for this, we use a variety of heuristics to make a best-effort calculation. Here are a few specific specific heuristics: + +- We exclude large, rapid changes - users can type a few characters in 15ms, but if the insertion is much bigger, it's a sign that it's coming from a different source +- We exclude disjoint insertions - insertions made in multiple places at once, which are likely to come from third party sources +- We exclude any insertions made in an inactive file/editor window +- We exclude any insertions into “stale” code - code the user hasn’t touched in the last 5 seconds + + + # Sourcegraph Analytics @@ -35175,7 +35462,8 @@ Self-hosted customers can also use this service, but they must Upgrade to a supported version of Sourcegraph (5.9+) Have fully enabled usage telemetry. -- [Enablement instructions](/analytics/cloud#enablement) + +- [Enablement instructions](/analytics/cloud#enablement) ![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/Docs/Sourcegraph-Analytics-2025-01-28.png) @@ -35191,9 +35479,16 @@ We provide a set of metrics that can be used to monitor Sourcegraph usage, engag Learn more about how we think about [the ROI of Sourcegraph in our blog](https://sourcegraph.com/blog/measuring-the-impact-of-ai-coding-tools). -### User metrics available +### Overview metrics -| Metric | Description | +| Metric | Description | +| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| Percent of code written by Cody | Percentage of code written by Cody out of all code written during the selected time. [Learn more about this metric.](/analytics/pcw) | +| Lines of code written by Cody | Total lines of code written by Cody during the selected time | + +### User metrics + +| Metric | Description | | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | Total active users | Total number of unique users who have used any Sourcegraph product during the selected time | | Average daily users | The average number of unique users who use Sourcegraph per day during the selected time | @@ -35209,60 +35504,60 @@ Cody-only user metrics Many of the metrics above are also available for Cody only. However, some user definitions are slightly different: -| User category | Description | +| User category | Description | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | Authenticated users | All users signed in to Cody in an editor or interacted with Cody on the web during the selected period. [Read more](/admin/pricing#authenticated-users). | | Active users | All users who sign in to Cody in an editor or interact with Cody on the web during the period selected. [Read more](/admin/pricing#billable-active-users). | ### Code Search & navigation metrics -| Metric | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | -| Total in-product searchers | Number of unique users who performed searches using the Sourcegraph search interface during the selected time | -| Total result clicks | Count of times users clicked on search results to view files or other resources during the selected time | -| Total file views | Number of times users viewed individual files through Sourcegraph during the selected time | -| Daily in-product search activity | Count of search operations performed each day through the Sourcegraph interface | -| Daily search users (in-product and API) | Number of unique users performing searches each day, including both UI and API usage | -| All searches (in-product and API) by type | Breakdown of searches by category (e.g., literal, regex), including both UI and API usage | -| Total code navigation actions | Count of all code navigation operations performed (e.g., go-to-definition, find references) during the selected time period | -| Precise code navigation % | Percentage of code navigation actions that used precise intelligence rather than search-based results during the selected time | -| Daily code navigation activity | Count of code navigation operations performed each day | -| Daily code navigation users | Number of unique users utilizing code navigation features each day | -| Precise vs. search-based code navigation actions by language | Comparison of precise vs. search-based navigation success rates broken down by programming language | +| Metric | Description | +| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | +| Total in-product searchers | Number of unique users who performed searches using the Sourcegraph search interface during the selected time | +| Total result clicks | Count of times users clicked on search results to view files or other resources during the selected time | +| Total file views | Number of times users viewed individual files through Sourcegraph during the selected time | +| Hours saved | The number of hours saved by search and code navigation users, assuming 5 minutes saved per search and 30 seconds per code navigation action | +| Daily in-product search activity | Count of search operations performed each day through the Sourcegraph interface | +| Daily search users (in-product and API) | Number of unique users performing searches each day, including both UI and API usage | +| All searches (in-product and API) by type | Breakdown of searches by category (e.g., literal, regex), including both UI and API usage | +| Total code navigation actions | Count of all code navigation operations performed (e.g., go-to-definition, find references) during the selected time period | +| Precise code navigation % | Percentage of code navigation actions that used precise intelligence rather than search-based results during the selected time | +| Daily code navigation activity | Count of code navigation operations performed each day | +| Daily code navigation users | Number of unique users utilizing code navigation features each day | +| Precise vs. search-based code navigation actions by language | Comparison of precise vs. search-based navigation success rates broken down by programming language | ### Autocompletion metrics -| Metric | Description | -| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Total accepted completions | Count of completions accepted by users during the selected time | -| Hours saved | The number of hours saved by Cody users, assuming 2 minutes saved per completion | -| Completions by day | The number of completions suggested by day and by editor. | -| Completion acceptance rate (CAR) | The percent of completions presented to a user for at least 750ms accepted by day, the editor, day, and month. | +| Metric | Description | +| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Total accepted completions | Count of completions accepted by users during the selected time | +| Hours saved | The number of hours saved by Cody users, assuming 2 minutes saved per completion | +| Completions by day | The number of completions suggested by day and by editor. | +| Completion acceptance rate (CAR) | The percent of completions presented to a user for at least 750ms accepted by day, the editor, day, and month. | | Weighted completion acceptance rate (wCAR) | Similar to CAR, but weighted by the number of characters presented in the completion, by the editor, day, and month. This assigns more "weight" to accepted completions that provide more code to the user. | -| Completion persistence rate | Percent of completions that are retained or mostly retained (67%+ of inserted text) after various time intervals. | -| Average completion latency (ms) | The average milliseconds of latency before a user is presented with a completion suggestion by an editor. | -| Acceptance rate by language | CAR and total completion suggestions broken down by editor during the selected time | +| Completion persistence rate | Percent of completions that are retained or mostly retained (67%+ of inserted text) after various time intervals. | +| Average completion latency (ms) | The average milliseconds of latency before a user is presented with a completion suggestion by an editor. | +| Acceptance rate by language | CAR and total completion suggestions broken down by editor during the selected time | ### Chat and prompt metrics -| Metric | Description | -| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| Total chat events | Total number of chat interactions with Cody during the selected time | -| Minutes saved per chat | Average time saved per chat interaction with Cody during the selected time | -| Hours saved by chats | Total hours saved through Cody chat interactions during the selected time , assuming 5 minutes saved per chat | -| Cody chats by day | Daily count of chat interactions | -| Cody chat users | Daily count of chat users | -| Lines of code inserted | Lines of code generated by Cody in chat that get applied, inserted, or pasted into the editor. Only VS Code is included in this metric for now | -| Insert rate | Percent of code generated by Cody in chat that gets applied, inserted, or pasted into the editor. Only VS Code is included in this metric for now | -| Chat apply & insert persistence rate | Percent of code inserted by Apply and Insert actions that are retained or mostly retained (67%+ of inserted text) after various time intervals | -| Prompts created, edited, and deleted by day | Daily count of prompt management activities, including creation, modification, and removal | -| Users creating, editing, and deleting prompts by day | Number of unique users performing prompt management activities each day | +| Metric | Description | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| Total chat events | Total number of chat interactions with Cody during the selected time | +| Hours saved by chats | Total hours saved through Cody chat interactions during the selected time , assuming 5 minutes saved per chat | +| Cody chats by day | Daily count of chat interactions | +| Cody chat users | Daily count of chat users | +| Lines of code inserted | Lines of code generated by Cody in chat that get applied, inserted, or pasted into the editor. Only VS Code is included in this metric for now | +| Insert rate | Percent of code generated by Cody in chat that gets applied, inserted, or pasted into the editor. Only VS Code is included in this metric for now | +| Chat apply & insert persistence rate | Percent of code inserted by Apply and Insert actions that are retained or mostly retained (67%+ of inserted text) after various time intervals | +| Prompts created, edited, and deleted by day | Daily count of prompt management activities, including creation, modification, and removal | +| Users creating, editing, and deleting prompts by day | Number of unique users performing prompt management activities each day | ### Command metrics (deprecated) _As of Sourcegraph version 5.10, commands are being deprecated in favor of our new feature, chat prompts. As a result, if your Sourcegraph instance is running version 5.10 or later, you may see decreased command usage. In the coming weeks, these command metrics will be deprecated and replaced with new prompt metrics on the Chats tab._ -| Metric | Description | +| Metric | Description | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Total command events | Total number of command executions during the selected time | | Hours saved by commands | Total hours saved through command executions during the selected time, assuming 5 minutes saved per command | @@ -36628,61 +36923,6 @@ Site administrators see update notifications and other site-level alerts (visibl - -# Pricing - -Visit the [pricing page](https://about.sourcegraph.com/pricing) for up-to-date pricing. - -## How are active users calculated for **Sourcegraph Cody**? - -### Billable active users - -This only applies to Enterprise Cody contracts. Cody Pro users pay for a seat every month, regardless of usage. - -A billable active Cody user is one who is signed in to their Enterprise Sourcegraph account and actively -interacts with Cody (e.g. they see suggested autocompletions, they run commands or chat with -Cody, they start new discussions, clear chat history, or copy text from chats, they change Cody -settings, and more). - -Simply having Cody installed and being signed in is not enough to be considered a billable user. - -Specific categories of user actions that qualify as active Cody usage for billing include, but are not limited to: - -- Signing in to Cody in an editor -- Seeing suggested autocompletions and/or accepting/rejecting them -- Running commands or chatting with Cody -- Starting new chats, clearing chat history, copying text from chats, or otherwise interacting with the Cody chat interface in the editor or on the web -- Adding or changing context in a Cody chat interface or changing models -- Interacting with Cody tutorials -- Changing Cody personal or team settings - -### Authenticated users - -An authenticated Cody user is one who is authenticated (or signed in) to Cody in their editor in a given time period. It also includes all users who interact with Cody on the web. - -Authenticated users is a superset of [billable users](#billable-active-users) defined above. It includes users who are signed in, but do not actively engage with Cody. - -## How are active users calculated for **Sourcegraph Code Search** and **Code Intelligence Platform**? - -A billable active Code Search or Code Intelligence Platform user is one who is signed into and accesses Sourcegraph. This includes but is not limited to: - -- Visiting the Sourcegraph web application or using a browser extension, editor extension, or other client while signed in -- Conducting a search in the Sourcegraph UI or extension -- Hovering and navigating code in the Sourcegraph UI or extension -- Viewing a file or repository in Sourcegraph -- Creating, viewing or receiving a code monitor -- Creating, viewing, modifying or applying a batch change -- Creating, viewing or modifying a code insight -- Creating, viewing or modifying a search notebook - -## How is this measured in the product? - -A user who has accessed a Sourcegraph product is counted as active once they complete an action that represents usage reflected above. - -User counts and more usage metrics can be found in [Sourcegraph Analytics](../analytics). - - - # Generating pprof profiling data @@ -37324,6 +37564,13 @@ Sourcegraph uses [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/ # Administration + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Sourcegraph administration is primarily managed by site administrators, who are responsible for the deployment, management, and configuration of Sourcegraph instances for end users. For a comprehensive introduction to site administration, refer to our [quickstart guide](/admin/how-to/site-admin-quickstart). @@ -38030,6 +38277,13 @@ To disable them, in the site config set `log.securityEventLog.location` to `none # Analytics + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + The analytics section helps Sourcegraph administrators understand user engagement across the various Sourcegraph features, identify power users, and convey value to internal leaders. Introduced in version 3.42, the section includes analytics breakdowns for our most common features such as Batch Changes, Search Notebooks and search, while also providing basic user-level analytics. ## Data Visualizations @@ -39091,7 +39345,14 @@ previously deploying using the `non-root` overlay, you should now generate overl -# Updating sourcegraph +# Updating Sourcegraph + + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + This page is intended as an entry point into Sourcegraph versioning, upgrades, and the `migrator` service which manages our database schemas. Here we'll cover general concepts and direct you toward relevant operations pages. @@ -41976,6 +42237,13 @@ To completely disable repo-centric permission sync scheduling, use this site con # Permissions + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + > NOTE: This page refers to repository access permissions synced between Sourcegraph and your code host, which has also historically been referred to as "authorization", "repository permissions", and "code host permissions". This is *not* the same as [in-product permissions](/admin/access_control/), which determine who can, for example, create a batch change or who is a site admin. Sourcegraph can be configured to enforce the same access to repositories and underlying @@ -43377,6 +43645,12 @@ Setting `SRC_LOG_SAMPLING_INITIAL` to `0` or `-1` will disable log sampling enti # Observability + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + A key pillar of production readiness is the ability to observe, monitor, and analyze the health and state of the system. Sourcegraph is designed, and ships with, a number of observability tools and capabilities to meet enterprise production readiness criteria. @@ -89719,6 +89993,13 @@ useJaeger # Licensing + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Sourcegraph requires a valid license key to enable many of its more prominent features. License keys should not be shared across instances of Sourcegraph. If an additional license key is required for something like a dev environment, please [contact customer support](https://about.sourcegraph.com/contact) for an additional license key. @@ -89867,9 +90148,31 @@ $ kubectl apply -f deploy-sourcegraph-k8s/base/sourcegraph/pgsql/pgsql.StatefulS ## Helm -To upgrade builtin containers in Helm admins must update their instance to v5.11.6271 via the [helm multi-version upgrade procedure](/admin/deploy/kubernetes#multi-version-upgrade-procedure) or standard upgrade procedure. This is because `helm upgrade` doesn't support just the DBs in a chart. +When using the in-cluster PostgreSQL databases included in the Sourcegraph Helm chart, database upgrades are integrated with the overall application upgrade process and there is no mechanism to upgrade only the PostgreSQL containers independently. Therefore, the PostgreSQL upgrade must be performed as part of a full Sourcegraph version upgrade. + +For production deployments, we recommend using external PostgreSQL databases, which allows for more flexible database management outside the Helm deployment lifecycle. - In Sourcegraph version 6.0.0 Sourcegraph services will no longer be able to connect to a Postgres 12 database. This means at and after Sourcegraph 6.0.0, migrator will not be connect to older versions to execute the `upgrade` command. +### Required Upgrade Path + +Sourcegraph versions `v6.0.x` and later require PostgreSQL 16 and will not connect to PostgreSQL 12 databases. This means any direct upgrade from versions earlier than `v5.10.3940` to any version `v6.0.x` or later will fail because the migrator in `v6.0.x` and later cannot connect to PostgreSQL 12 to perform the upgrade. + +To safely upgrade PostgreSQL in Helm deployments: + +1. **First upgrade to an intermediate version**: + - Upgrade to either Sourcegraph `v5.10.3940` or `v5.11.6271` using the [helm multi-version upgrade procedure](/admin/deploy/kubernetes#multi-version-upgrade-procedure) or [standard upgrade procedure](/admin/deploy/kubernetes#standard-upgrades) + - These specific versions include the necessary PostgreSQL upgrade scripts to safely migrate from PG12 to PG16 + +2. **Verify the PostgreSQL upgrade** (optional): + - You can verify the PostgreSQL version has been successfully upgraded by connecting to the database: + ```bash + kubectl exec -it pgsql -- psql -U sg -c "SELECT version();" + ``` + - The output should show PostgreSQL 16.x + +3. **Proceed to target version**: + - Once PostgreSQL has been upgraded to version 16, you can safely upgrade to your target version (`v6.0.x` or later) using the standard upgrade procedure + +For any issues during the PostgreSQL upgrade process, please contact support@sourcegraph.com. @@ -92559,6 +92862,13 @@ the output of the step cannot be captured properly for template variable renderi # Executors + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Executors are Sourcegraph's solution for running untrusted code in a secure and controllable way. Executors provide a sandbox that can run resource-intensive or untrusted tasks on behalf of the Sourcegraph instance, such as: - [Automatically indexing a repository for precise code navigation](/code-search/code-navigation/auto_indexing) @@ -93139,7 +93449,7 @@ There are two types of secrets: - **Namespaced secrets** - These secrets are set either in org or user settings and are only usable by the user or org members in their respective namespaces. If a namespaced secret has the same name as a global secret, the namespaced secret is preferred. + These secrets are set either in org or user settings and are only usable by the user or org members in their respective namespaces. For example, user-specific executor secrets apply only to batch changes within the user's namespace. If you've created a server-side batch spec under an organization or a different namespace, ensure the secret is defined under `/organizations/{org-namespace}/settings/executors/secrets`. If a namespaced secret has the same name as a global secret, the namespaced secret is preferred. Examples: @@ -95586,6 +95896,13 @@ Please refer to our [resource estimator](/admin/deploy/resource_estimator) for m # Deployment Overview + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Sourcegraph is a powerful code intelligence platform that can be deployed in various ways to suit your organization's needs. This guide will help you understand the available deployment options and choose the best one for your use case. ## Deployment types @@ -98615,7 +98932,7 @@ When all pods have restarted and show as Running, you can browse to your Sourceg - Check the `Site Admin > Updates` page to determine [upgrade readiness](/admin/updates/#upgrade-readiness). **Step 2:** -> The Kubernetes Helm deployment type does not support MVU from Sourcegraph `v5.9.45` versions and earlier to Sourcegraph `v6.0.0`. Admins seeking to upgrade to Sourcegraph `v6.0.0` should upgrade to `v5.10.3940` or `v5.11.6271` and then use the standard upgrade procedure to get to `v6.0.0`. This is because migrator v6.0.0 will no longer connect to Postgres 12 databases. For more info see our [PostgreSQL upgrade docs](/admin/postgres#requirements). +> The Kubernetes Helm deployment type does not support MVU from Sourcegraph `v5.9.45` versions and earlier to ANY version `v6.0.x` or later. Admins seeking to upgrade to any Sourcegraph version `v6.0.x` or later (including `v6.1.x`, `v6.2.x`, etc.) must first upgrade to `v5.10.3940` or `v5.11.6271` and then use the standard upgrade procedure to get to their target version. This is because migrator in all versions from `v6.0.0` onwards will no longer connect to Postgres 12 databases. For more info see our [PostgreSQL upgrade docs](/admin/postgres#requirements). Scale down `deployments` and `statefulSets` that access the database, _this step prevents services from accessing the database while schema migrations are in process._ The following services must have their replicas scaled to 0: @@ -104928,6 +105245,13 @@ To achieve this, we use [gitea's hostmatcher](https://github.com/go-gitea/gitea/ # Configuring Sourcegraph + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + This page documents how to configure a Sourcegraph instance. For deployment configuration, please refer to the [relevant deployment docs for your deployment type](/admin/deploy/#deployment-types). - [Site configuration](/admin/config/site_config) @@ -105206,11 +105530,11 @@ To restore the default behavior, you can either delete the `batchChanges.rollout Or, to put it another way: -| `batchChanges.rolloutWindows` configuration | Behavior | -|---------------------------------------------|-----------| -| Omitted, or set to `null` | Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. | +| `batchChanges.rolloutWindows` configuration | Behavior | +| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Omitted, or set to `null` | Changesets will be reconciled as fast as the code host allows; essentially the same as setting a single `{"rate": "unlimited"}` window. | | Set to an array (even if empty) | Changesets will be reconciled using the rate limit in the current window using [the leaky bucket behavior described below](#leaky-bucket-rate-limiting). If no window covers the current period, then no changesets will be reconciled until a window with a non-zero [`rate`](#rate) opens. | -| Any other value | The configuration is invalid, and an error will appear. | +| Any other value | The configuration is invalid, and an error will appear. | #### Leaky bucket rate limiting @@ -105347,18 +105671,53 @@ For those that require a separate API call, Batch Changes will only be able to d Refer to the table below to see the levels with which each code host is supported: -Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note ---------- | --------- | :-: | :-: | ---- -Azure DevOps | Changeset property | ✓ | ✗ | -Bitbucket Cloud | Changeset property | ✓ | ✓ | -Bitbucket Server | API call | ✓ | ✓ | -GitHub | API call | ✓ | ✓ | -GitLab | Changeset property | ✓ | ✓ | -Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum + Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note +---------------- | ---------------------------------------- | :--------------: | :--------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------- +Azure DevOps | Changeset property | ✓ | ✗ | +Bitbucket Cloud | Changeset property | ✓ | ✓ | +Bitbucket Server | API call | ✓ | ✓ | +GitHub | API call | ✓ | ✓ | +GitLab | Changeset property | ✓ | ✓ | +Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum + +## Commit signing + +Batch Changes supports commit signing with both GitHub apps and with SSH keys. + +### Commit signing with SSH keys (GitLab and GitHub) + +Commit signing with SSH keys is currently Experimental and is supported only with Sourcegraph v6.2 or more. + +Commit signing with SSH keys can only be combined with a personal or fine-grained access token. + +Sourcegraph can be configured to sign commits using SSH keys with user and site admin credentials. + +To enable **commit signing for your Batch Changes user**, navigate to **Settings > Batch Changes** and click **Add credentials** for a GitHub or GitLab code host. + +![List of code hosts with an arrow pointing to add credential](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/code_host_add_credential.png) + +If you already have a credential for the given code host, remove it first. + +Enter your personal access token, and check the "Sign commits on this code host" box. This will add a step to the setup flow. Click "Next" and wait for Batch Changes to verify the access token. -## Commit signing for GitHub +![The modal for adding a credential with an arrow pointing to the checkbox for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_checkbox.png) - The feature is currently in Beta stage and supported on Sourcegraph versions 5.1 or more. +Once the credential is added, you can copy the public SSH key Batch Changes will use to sign commits. You can view the public key anytime by clicking **View Credentials**. + +![The modal displays the ssh key used for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_view_ssh_key.png) + +Add this public SSH key to your [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) or [GitLab](https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account) account. +Make sure you add it as a signing key. + +![Add the key to your code host as a signing key](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/github_add_signing_key.png) + +To enable **commit signing as a site admin**, navigate to **Site Admin > Section: Batch Changes > Settings** and click **Add credentials** for a GitHub or GitLab code host. The rest of the setup is the same as above. + +![Site admin settings for batch changes](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/batch_changes_site_admin_settings.png) + +### Commit signing with GitHub apps + +Commit signing with GitHub apps is currently in Beta and is supported with Sourcegraph v5.1 or more. Sourcegraph can be configured to [sign commits pushed to GitHub](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) using a GitHub App. Commit signing prevents tampering by unauthorized parties and provides a way to ensure that commits pushed to branches created by Batch Changes actually do come from Sourcegraph. Enabling commit signing for Batch Changes can also help pass checks in build systems or CI/CD pipelines that require that all commits are signed and verified before they can be merged. @@ -105483,6 +105842,35 @@ This allows recovering the Batch Changes if the user is restored. However, if the user deletion is permanent, deleting both account and data, then the associated Batch Changes are also permanently deleted from the database. This frees storage space and removes dangling references. +## Batch Spec Library + + Batch Spec Library is currently in Experimental. + +The Batch Spec Library is a collection of Batch Specs that can be used to create Batch Changes. Sourcegraph provides a few Batch Specs out of the box. + +Site admins can manage the library through the GraphQL mutations `createBatchSpecLibraryRecord`, `updateBatchSpecLibraryRecord`, and `deleteBatchSpecLibraryRecord`. Use the query `batchSpecLibrary` to list all available Batch Spec examples. + +```graphql +createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example") { + id +} + +updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2") { + id +} + +deleteBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4") { + alwaysNil +} + +batchSpecLibrary(first: 100) { + nodes { + id + name + } +} +``` + @@ -106644,6 +107032,13 @@ Sourcegraph supports internal rate limit configuration for the following connect # Phabricator + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Site admins can associate Git repositories on [Phabricator](https://phabricator.org) with Sourcegraph so that users can jump to the Phabricator repository from Sourcegraph and use the [Phabricator extension](#native-extension) and [browser extension](/integration/browser_extension) with Phabricator. > ⚠️ NOTE: Sourcegraph support of Phabricator is limited ([learn more](/integration/phabricator)), and not expected to evolve due to the [announced](https://admin.phacility.com/phame/post/view/11/phacility_is_winding_down_operations/) cease of support for Phabricator. @@ -106735,6 +107130,13 @@ The Sourcegraph instance's site admin must [update the `corsOrigin` site config # Other Git repository hosts + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Site admins can sync Git repositories on any Git repository host (by Git clone URL) with Sourcegraph so that users can search and navigate the repositories. Use this method only when your repository host is not named as a supported [code host](/admin/code_hosts/). To connect generic Git host to Sourcegraph: @@ -106844,6 +107246,13 @@ Repositories must be listed individually: # Non-Git code hosts (Perforce, Mercurial, Subversion, raw text, etc.) + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Sourcegraph natively supports all Git-based Version Control Systems (VCSs) and code hosts. For non-Git code hosts, Sourcegraph provides a CLI tool called `src-expose` to periodically sync and continuously serve local directories as Git repositories over HTTP. >NOTE: If using Perforce, see the [Perforce repositories with Sourcegraph guide](/admin/repo/perforce). @@ -106965,6 +107374,13 @@ See [an example YAML file containing available configuration options](https://gi # Code host connections + + [Enterprise Starter](/pricing/enterprise-starter) only supports GitHub. [Enterprise](/pricing/enterprise) supports all listed code hosts. + + Available via the Web app. + + + Sourcegraph Enterprise Starter supports only GitHub as a code host connection. Enterprise plan can connect to all supported code hosts listed on this page. Sourcegraph can sync repositories from code hosts and other similar services. We designate code hosts between Tier 1 and Tier 2 based on Sourcegraph's capabilities when used with those code hosts. @@ -107067,6 +107483,13 @@ In Sourcegraph 4.4, site administrators have the ability to test a code host con # Gitolite + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + > NOTE: While it is possible to connect Gitolite repositories to Sourcegraph, we currently do not recommend it. If you have specific questions, please discuss with your account team. Site admins can link and sync Git repositories on [Gitolite](https://gitolite.com) with Sourcegraph so that users can search and navigate the repositories. @@ -107551,6 +107974,8 @@ To create a GitHub App and connect it to Sourcegraph: 9. (Optional) If you want to sync repositories from other organization or user namespaces and your GitHub App is set to public visibility, you can create additional installations with **Add installation**. +> NOTE: When you create a GitHub App, Sourcegraph automatically sets up an [incoming webhook](/admin/config/webhooks/incoming) for the app. This webhook subscribes to events for any repository or organization the app has access to, allowing Sourcegraph to keep repository and permission data in sync with GitHub. + > NOTE: If you are using [Batch Changes](/batch-changes/), you can create a GitHub App to perform [commit signing](/admin/config/batch_changes#commit-signing-for-github) (Beta). ### Multiple installations @@ -107594,6 +108019,11 @@ Once public, App can be installed in additional namespaces either from Sourcegra 5. To sync repositories from this installation, click **Add connection** under your new installation. +### Configuring Multiple Private GitHub Apps for Sourcegraph +If you prefer not to make your GitHub App public and instead create separate private GitHub Apps for each organizations, users will need to authorize each GitHub App individually to ensure proper repository access and permissions syncing. This is because GitHub Apps have narrowly scoped permissions and do not share authentication across multiple installations. To streamline this process, users can go to `User Settings` > `Account Security` in Sourcegraph and connect all necessary GitHub Apps from there. Once authorized, Sourcegraph will use the user's GitHub identity to determine access across all configured GitHub Apps. + +For customers using GitHub Enterprise Cloud, an alternative approach is to create an Enterprise GitHub App, which can be installed across multiple organizations within an enterprise account while maintaining private visibility. More details on this approach can be found in [GitHub's documentation](https://docs.github.com/en/enterprise-cloud@latest/admin/managing-your-enterprise-account/creating-github-apps-for-your-enterprise). + ### Uninstalling an App You can uninstall a GitHub App from a namespace or remove it altogether at any time. @@ -108064,16 +108494,24 @@ If you would like to sync all public repositories while omitting archived repos, # Gerrit - This feature is in beta and might change in the future. + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + +This feature is in beta and might change in the future. A Gerrit instance can be connected to Sourcegraph as follows: - [Gerrit](#gerrit) - [Configure Gerrit as a code host connection](#configure-gerrit-as-a-code-host-connection) + - [Clone using SSH](#clone-using-ssh) - [Add Gerrit as an authentication provider](#add-gerrit-as-an-authentication-provider) - [Have users authenticate their Sourcegraph accounts using their Gerrit HTTP credentials](#have-users-authenticate-their-sourcegraph-accounts-using-their-gerrit-http-credentials) - [Configuration](#configuration) - - [admin/external\_service/gerrit.schema.json](#adminexternal_servicegerritschemajson) + - [admin/code\_hosts/gerrit.schema.json](#admincode_hostsgerritschemajson) ## Configure Gerrit as a code host connection @@ -108210,7 +108648,14 @@ Gerrit connections support the following configuration options, which are specif -# Bitbucket Server / Bitbucket Data Center +# Bitbucket Server/Bitbucket Data Center + + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + Site admins can sync Git repositories hosted on [Bitbucket Server](https://www.atlassian.com/software/bitbucket/server) or [Bitbucket Data Center](https://www.atlassian.com/enterprise/data-center/bitbucket) with Sourcegraph so that users can search and navigate their repositories. @@ -108538,6 +108983,13 @@ Bitbucket Server / Bitbucket Data Center connections support the following confi # Bitbucket Cloud + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Site admins can sync Git repositories hosted on [Bitbucket Cloud](https://bitbucket.org) with Sourcegraph so that users can search and navigate the repositories. To connect Bitbucket Cloud to Sourcegraph: @@ -108746,6 +109198,13 @@ Please consult [this page](/admin/config/webhooks/incoming) in order to configur # Azure DevOps + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Site admins can sync Git repositories hosted on [Azure DevOps](https://dev.azure.com) with Sourcegraph so that users can search and navigate the repositories. To connect Azure DevOps to Sourcegraph, create a personal access token from your user settings page by following the below steps: @@ -108900,6 +109359,13 @@ When Sourcegraph hits a rate limit imposed by Azure DevOps, Sourcegraph waits th # AWS CodeCommit + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + Site admins can sync Git repositories hosted on [AWS CodeCommit](https://aws.amazon.com/codecommit/) with Sourcegraph so that users can search and navigate the repositories. To connect AWS CodeCommit to Sourcegraph: @@ -109312,6 +109778,13 @@ In this example, the GitHub auth provider will not be shown on the login form at # User authentication + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + In order to use a Sourcegraph instance, users need an account on the instance. Accounts are used to store settings and preferences, but also to identify a person to make decisions about repository visibility. For that, various authentication providers can be configured. Multiple options can be provided. @@ -110616,6 +111089,13 @@ Name | Description | Granted to **User** by default? # Access control + + Supported on [Enterprise](/pricing/enterprise) plans. + + Available via the Web app. + + + This feature is in Beta stage. > NOTE: This page refers to in-product permissions, which determine who can, for example, create a batch change, or who is a site admin. This is *not* the same as [repository permissions](/admin/permissions/), which enforces the same repository access on Sourcegraph as your code host. diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 2a9ad624e..52b5d3d33 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -151,6 +151,7 @@ export const navigation: NavigationItem[] = [ subsections: [ { title: "Publishing Changesets", href: "/batch-changes/publishing-changesets", }, { title: "Tracking Changesets", href: "/batch-changes/tracking-existing-changesets", }, + { title: "Rebasing Changesets", href: "/batch-changes/rebasing-changesets", }, ] }, { diff --git a/src/data/versions.ts b/src/data/versions.ts index e21a8ca24..713917e3a 100644 --- a/src/data/versions.ts +++ b/src/data/versions.ts @@ -15,8 +15,8 @@ export const versions: VersionI[] = [ url: '/', }, { - name: 'v6.0', - url: 'https://6.0.sourcegraph.com/' + name: 'v6.1', + url: 'https://6.1.sourcegraph.com/' }, ];