diff --git a/docs/admin/config/batch_changes.mdx b/docs/admin/config/batch_changes.mdx index 16ae529d3..92eda3b71 100644 --- a/docs/admin/config/batch_changes.mdx +++ b/docs/admin/config/batch_changes.mdx @@ -370,3 +370,42 @@ batchSpecLibrary(first: 100) { } } ``` + +### Featured Templates + +Sourcegraph 6.4+ + +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. + +### Labels + +Sourcegraph 6.4+ + +Batch Spec Library records support an optional `labels` field for categorization and filtering. Common labels include: + +- `"featured"` - Marks popular or recommended batch specs that are displayed in a "Featured Templates" section above the remaining examples +- Custom labels for organizational categorization (not exposed to Batch Changes users yet) + +To remove the featured status, you can update the library record with an empty list of labels (`[]`). + +```graphql +createBatchSpecLibraryRecord(name: "example", spec: "version: 2\nname: example", labels: ["featured"]) { + id + labels +} + +updateBatchSpecLibraryRecord(id: "QmF0Y2hTcGVjTGlicmFyeVJlY29yZDo4", name: "example-2", spec: "version: 2\nname: example-2", labels: ["featured"]) { + id + labels +} + +# Query only featured batch specs +batchSpecLibrary(first: 100, labels: ["featured"]) { + nodes { + id + name + labels + spec + } +} +```