Skip to content
Merged
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
39 changes: 39 additions & 0 deletions docs/admin/config/batch_changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -370,3 +370,42 @@ batchSpecLibrary(first: 100) {
}
}
```

### Featured Templates

<Callout type="note">Featured templates are supported in Sourcegraph v6.4 and more.</Callout>

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

<Callout type="note">Labels are supported in Sourcegraph v6.4 and more.</Callout>

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
}
}
```