Skip to content

Commit 4acbe44

Browse files
committed
review udpates
1 parent 5f3010c commit 4acbe44

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

docs/admin/config/batch_changes.mdx

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -344,29 +344,29 @@ However, if the user deletion is permanent, deleting both account and data, then
344344

345345
## Batch Spec Library
346346

347-
The Batch Spec Library accelerates batch change adoption by offering curated examples and guided templates that make large-scale code modifications accessible to developers at every skill level.
347+
The Batch Spec Library offers curated examples and guided templates that make large-scale code modifications accessible to developers at every skill level. As a site admin you can manage the library.
348348

349-
The library distinguishes between [templates](#templates) and [library examples](#library-examples), where library examples are complete batch specs and templates are library examples with variables.
349+
The library distinguishes between [templates](#templates) and [examples](#library-examples). Examples are batch specs that are meant to be modified by power users who are comfortable with the batch spec syntax. Templates, on the other hand, are batch specs that contain variables that the user can provide data for through form fields without having to modify the batch spec code.
350350

351-
Sourcegraph instances come with a couple of library examples out of the box. You can use the GraphQL APIs to [manage the Batch Spec Library](#managing-the-batch-spec-library).
351+
Sourcegraph instances come with a couple of examples out of the box. You can use the GraphQL APIs to [manage the Batch Spec Library](#managing-the-batch-spec-library).
352352

353-
As a site admin, you can [feature records](#featured-records) to highlight the most useful examples for your organization.
353+
As a site admin, you can [feature records](#featured-records) to highlight the most useful templates and examples for your organization.
354354

355-
### Library examples
355+
### Examples
356356

357-
Library examples are complete batch specs intended for advanced users who are comfortable working with YAML and writing code. These examples serve as inspiration and starting points for custom batch changes, providing reference implementations that can be adapted to specific use cases.
357+
Examples are complete batch specs intended for advanced users who are comfortable working with YAML and writing code. These examples serve as inspiration and starting points for custom batch changes.
358358

359-
Library examples are visible in the library pane when you are in the batch spec editor. They are not displayed by default in the templates list which is the entry point for users creating a batch change. See [choosing a template](/batch-changes/create-a-batch-change#choosing-a-template) for more details.
359+
Examples are visible in the library pane when you are in the batch spec editor. They are not displayed by default in the templates list which is the entry point for users creating a batch change. See [choosing a template](/batch-changes/create-a-batch-change#choosing-a-template) for more details.
360360

361361
### Templates
362362

363363
<Callout type="note">Templates are supported in Sourcegraph v6.6 and more.</Callout>
364364

365-
Templates are like library examples, but with variables for easy reuse across multiple batch changes. Templates provide the simplest path for users to create batch changes without needing to learn Batch Spec YAML syntax. Users select from a curated list of templates and complete a form with the required parameters, making batch change creation accessible to all team members regardless of their technical background.
365+
Templates are like examples, but with variables for easy reuse across multiple batch changes. Templates provide the simplest path for users to create batch changes without needing to learn Batch Spec YAML syntax. Users select from a curated list of templates and complete a form with the required parameters, making batch change creation accessible to all team members regardless of their technical background.
366366

367-
A library example becomes a template once it has at least one [variable](#variables) defined. It will then be displayed on the list of templates that a user sees when they click on [create a batch change](/batch-changes/create-a-batch-change).
367+
An example becomes a template once it has at least one [variable](#variables) defined. It will then be displayed in the list of templates that a user sees when they click on [create a batch change](/batch-changes/create-a-batch-change).
368368

369-
You can use variables to replace any text in the batch spec, allowing for flexible customization of repository queries, commands, commit messages, and more, but not for the name of the batch change.
369+
Variables can be used to replace any text in the batch spec except the batch change's name.
370370

371371
### Managing the Batch Spec Library
372372

@@ -398,14 +398,13 @@ batchSpecLibrary(first: 100) {
398398

399399
### Featured Records
400400

401-
Site-admins can mark a record 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. This will add or remove the `"featured"` [label](#labels).
401+
Site-admins can mark a record as featured by either clicking the star button next to the list of library records or adding the `"featured"` [label](#labels) label with a GraphQL mutation. Featured records will automatically move to a section atop the remaining library records.
402402

403403
### Labels
404404

405-
Batch Spec Library records support an optional `labels` field for categorization and filtering. Common labels include:
405+
Library records support an optional `labels` field for categorization and filtering.
406406

407-
- `"featured"` - Marks popular or recommended batch specs that are displayed in a "Featured Templates" section above the remaining examples
408-
- Custom labels for organizational categorization (not exposed to Batch Changes users yet)
407+
The `"featured"` label marks popular or recommended batch specs that are displayed in a featured section above the remaining examples and templates.
409408

410409
To remove the featured status, you can update the library record with an empty list of labels (`[]`).
411410

@@ -435,7 +434,7 @@ batchSpecLibrary(first: 100, labels: ["featured"]) {
435434

436435
<Callout type="note">Variables are supported in Sourcegraph v6.6 and more.</Callout>
437436

438-
Templates use variables to make batch specs adaptable to different scenarios. When creating a template, you can define placeholders for values that will vary between different uses of the template. Users filling out the template see these variables as form fields where they can enter specific values like repository names, file paths, or commit messages.
437+
When creating a template, you can define placeholders for values that will vary between different uses of the template. Users filling out the template see these variables as form fields where they can enter specific values like repository names, file paths, or commit messages.
439438

440439
<Callout type="note">You cannot use a variable for the batch change name.</Callout>
441440

@@ -464,4 +463,4 @@ libraryVariables: [{
464463
}
465464
```
466465

467-
To update or remove variables from an existing template, you will need to recreate the entire batch spec library record using the `deleteBatchSpecLibraryRecord` and `createBatchSpecLibraryRecord` mutations.
466+
To update or remove variables from an existing template, you will need to recreate the record using the `deleteBatchSpecLibraryRecord` and `createBatchSpecLibraryRecord` mutations.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You will be redirected to a page showing you a list of curated templates.
3030
From the template selection page, you can either:
3131

3232
- **Pick a template** from the list of curated templates that best matches your use case
33-
- **Click "Start from Scratch"** if you prefer to start with a blank spec
33+
- **Click "Start from Scratch"** if you prefer to continue without a template
3434

3535
![templates_list](https://sourcegraphstatic.com/docs/images/batch_changes/2025/templates_list.png)
3636

@@ -42,11 +42,11 @@ If you selected a template, you will need to fill out the form fields specific t
4242

4343
![templates_form](https://sourcegraphstatic.com/docs/images/batch_changes/2025/templates_form.png)
4444

45-
The form fields are validated by regular expressions. If the validation fails, look at the description of that field to see what kind of value is required. If you have suggestions for improving the field descriptions, reach out to your site admin who can update these template fields.
45+
The form fields are validated by regular expressions. If the validation fails, look at the description of that field to see what kind of value is required.
4646

4747
### Choose a name for your batch change
4848

49-
After you've filled out the template form fields, or after you clicked "Start from Scratch", you will be prompted to choose a name for your namespace and optionally define a custom namespace to put your batch change in.
49+
After you've filled out the template form fields, or after you've clicked "Start from Scratch", you will be prompted to choose a name for your namespace and optionally define a custom namespace to put your batch change in.
5050

5151
![server-side-batch-change](https://sourcegraphstatic.com/docs/images/batch_changes/2024/create-a-batch-change.png)
5252

@@ -64,7 +64,7 @@ The library contains examples that you can apply right into your batch spec if y
6464

6565
### Executing your batch spec
6666

67-
When the spec is ready to run, ensure the preview is up to date and then click **Run batch spec**. This takes you to the execution screen. On this page, you see:
67+
When the spec is ready to run, ensure the [preview](/batch-changes/create-a-batch-change#previewing-workspaces) is up to date and then click **Run batch spec**. This takes you to the execution screen. On this page, you see:
6868

6969
- Run statistics at the top
7070
- All the workspaces, including status and diff stat, in the left panel
@@ -82,7 +82,7 @@ Once finished, you can proceed to the batch spec preview, as you know it from be
8282

8383
### Previewing and applying the batch spec
8484

85-
On this page, you can review the proposed changes and the operations taken by Sourcegraph on each changeset. Once satisfied, click **Apply**.
85+
On this page, you can review the proposed changes. Once satisfied, click **Apply**.
8686

8787
Congratulations, you ran your first batch change server-side 🎊
8888

docs/batch-changes/view-batch-changes.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
## Viewing batch changes
66

7-
You can view a list by clicking the **Batch Changes** icon in the top navigation bar:
7+
You can view a list of Batch Changes by clicking the **Batch Changes** icon in the top navigation bar:
88

99
![batch-change-icon-to-view](https://sourcegraphstatic.com/docs/images/batch_changes/2024/batch_changes_icon_in_menu.png)
1010

1111
### Title-based search
1212

13-
You can search through your previously created batch changes by title. This search experience makes it much easier to find the batch change you're looking for, especially when you have large volumes of batch changes to monitor.
13+
You can search through your previously created batch changes by title. This search experience makes it easier to find the batch change you're looking for, especially when you have large volumes of batch changes to monitor.
1414

1515
Start typing the keywords that match the batch change's title, and you will see a list of relevant results.
1616

1717
![title-based-search-batch-changes](https://storage.googleapis.com/sourcegraph-assets/Docs/title-based-search-bc.png)
1818

1919
## Filtering Batch Changes
2020

21-
You can also use the filters to switch between showing all open or closed Batch Changes.
21+
You can also use filters to switch between showing all open or closed Batch Changes.
2222

2323
![use-filters-batch-changes](https://sourcegraphstatic.com/docs/images/batch_changes/2024/viewing_batch_changes_filtering.png)
2424

0 commit comments

Comments
 (0)