Skip to content

Commit f9a53fb

Browse files
authored
feat(batches): docs for batch spec library labels (#1169)
Documentation for https://linear.app/sourcegraph/issue/SRCH-1920/batch-changes-featured-batch-specs
1 parent 319a395 commit f9a53fb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/admin/config/batch_changes.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,3 +370,42 @@ batchSpecLibrary(first: 100) {
370370
}
371371
}
372372
```
373+
374+
### Featured Templates
375+
376+
<Callout type="note">Featured templates are supported in Sourcegraph v6.4 and more.</Callout>
377+
378+
Site-admins can mark a template as featured by either clicking the star button next to the list of library records. Featured records will automatically move to a section atop the remaining library records.
379+
380+
### Labels
381+
382+
<Callout type="note">Labels are supported in Sourcegraph v6.4 and more.</Callout>
383+
384+
Batch Spec Library records support an optional `labels` field for categorization and filtering. Common labels include:
385+
386+
- `"featured"` - Marks popular or recommended batch specs that are displayed in a "Featured Templates" section above the remaining examples
387+
- Custom labels for organizational categorization (not exposed to Batch Changes users yet)
388+
389+
To remove the featured status, you can update the library record with an empty list of labels (`[]`).
390+
391+
```graphql
392+
createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example", labels: ["featured"]) {
393+
id
394+
labels
395+
}
396+
397+
updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2", labels: ["featured"]) {
398+
id
399+
labels
400+
}
401+
402+
# Query only featured batch specs
403+
batchSpecLibrary(first: 100, labels: ["featured"]) {
404+
nodes {
405+
id
406+
name
407+
labels
408+
spec
409+
}
410+
}
411+
```

0 commit comments

Comments
 (0)