Skip to content

Commit 59866d0

Browse files
feat: update docs for commit signing (#1021)
Closes SRCH-1746 --------- Co-authored-by: Maedah Batool <[email protected]>
1 parent c7c9f62 commit 59866d0

File tree

1 file changed

+49
-14
lines changed

1 file changed

+49
-14
lines changed

docs/admin/config/batch_changes.mdx

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ To restore the default behavior, you can either delete the `batchChanges.rollout
3030

3131
Or, to put it another way:
3232

33-
| `batchChanges.rolloutWindows` configuration | Behavior |
34-
|---------------------------------------------|-----------|
35-
| 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. |
33+
| `batchChanges.rolloutWindows` configuration | Behavior |
34+
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35+
| 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. |
3636
| 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. |
37-
| Any other value | The configuration is invalid, and an error will appear. |
37+
| Any other value | The configuration is invalid, and an error will appear. |
3838

3939
#### Leaky bucket rate limiting
4040

@@ -171,18 +171,53 @@ For those that require a separate API call, Batch Changes will only be able to d
171171

172172
Refer to the table below to see the levels with which each code host is supported:
173173

174-
Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note
175-
--------- | --------- | :-: | :-: | ----
176-
Azure DevOps | Changeset property | ✓ | ✗ |
177-
Bitbucket Cloud | Changeset property | ✓ | ✓ |
178-
Bitbucket Server | API call | ✓ | ✓ |
179-
GitHub | API call | ✓ | ✓ |
180-
GitLab | Changeset property | ✓ | ✓ |
181-
Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum
174+
Code Host | Changeset property or separate API call? | Support on merge | Support on close | Note
175+
---------------- | ---------------------------------------- | :--------------: | :--------------: | -----------------------------------------------------------------------------------------------------------------------------------------------------------
176+
Azure DevOps | Changeset property | ✓ | ✗ |
177+
Bitbucket Cloud | Changeset property | ✓ | ✓ |
178+
Bitbucket Server | API call | ✓ | ✓ |
179+
GitHub | API call | ✓ | ✓ |
180+
GitLab | Changeset property | ✓ | ✓ |
181+
Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum
182182

183-
## Commit signing for GitHub
183+
## Commit signing
184184

185-
<Callout type="note"> The feature is currently in Beta stage and supported on Sourcegraph versions 5.1 or more.</Callout>
185+
Batch Changes supports commit signing with both GitHub apps and with SSH keys.
186+
187+
### Commit signing with SSH keys (GitLab and GitHub)
188+
189+
<Callout type="note">Commit signing with SSH keys is currently Experimental and is supported only with Sourcegraph v6.2 or more.</Callout>
190+
191+
Commit signing with SSH keys can only be combined with a personal or fine-grained access token.
192+
193+
Sourcegraph can be configured to sign commits using SSH keys with user and site admin credentials.
194+
195+
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.
196+
197+
![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)
198+
199+
If you already have a credential for the given code host, remove it first.
200+
201+
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.
202+
203+
![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)
204+
205+
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**.
206+
207+
![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)
208+
209+
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.
210+
Make sure you add it as a signing key.
211+
212+
![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)
213+
214+
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.
215+
216+
![Site admin settings for batch changes](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/batch_changes_site_admin_settings.png)
217+
218+
### Commit signing with GitHub apps
219+
220+
<Callout type="note">Commit signing with GitHub apps is currently in Beta and is supported with Sourcegraph v5.1 or more.</Callout>
186221

187222
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.
188223

0 commit comments

Comments
 (0)