Skip to content

Commit dae6c38

Browse files
feat: update docs for batches library (#1035)
Closes SRCH-1776 --------- Co-authored-by: Maedah Batool <[email protected]>
1 parent 82b5b2a commit dae6c38

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

docs/admin/config/batch_changes.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,30 @@ When a user is deleted, their Batch Changes become inaccessible in the UI but th
306306
This allows recovering the Batch Changes if the user is restored.
307307

308308
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.
309+
310+
## Batch Spec Library
311+
312+
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.
313+
314+
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.
315+
316+
```graphql
317+
createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example") {
318+
id
319+
}
320+
321+
updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2") {
322+
id
323+
}
324+
325+
deleteBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4") {
326+
alwaysNil
327+
}
328+
329+
batchSpecLibrary(first: 100) {
330+
nodes {
331+
id
332+
name
333+
}
334+
}
335+
```

docs/batch-changes/create-a-batch-change.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You should see the editor view now. This view consists of three main areas:
140140

141141
![ssbc_editor_panels](https://sourcegraphstatic.com/docs/images/batch_changes/2024/ssbc_editor_panels.png)
142142

143-
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.
143+
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.
144144

145145
### Previewing workspaces
146146

docs/batch-changes/site-admin-configuration.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Using Batch Changes requires a [code host connection](/admin/external_services/)
1717
- [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
1818
- [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
1919
- [Commit signing for GitHub](/admin/config/batch_changes#commit-signing-for-github), which signs commits created by Batch Changes via a GitHub App (Beta)
20+
- [Batch spec library](/admin/config/batch_changes#batch-spec-library), which help your users write batch specs and follow best practices
2021

2122
## Disable Batch Changes
2223

0 commit comments

Comments
 (0)