Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/admin/config/batch_changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,30 @@ 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

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
}
}
```
2 changes: 1 addition & 1 deletion docs/batch-changes/create-a-batch-change.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions docs/batch-changes/site-admin-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down