You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/config/batch_changes.mdx
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -344,29 +344,29 @@ However, if the user deletion is permanent, deleting both account and data, then
344
344
345
345
## Batch Spec Library
346
346
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.
348
348
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.
350
350
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).
352
352
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.
354
354
355
-
### Library examples
355
+
### Examples
356
356
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.
358
358
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.
360
360
361
361
### Templates
362
362
363
363
<Callouttype="note">Templates are supported in Sourcegraph v6.6 and more.</Callout>
364
364
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.
366
366
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).
368
368
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.
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.
402
402
403
403
### Labels
404
404
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.
406
406
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.
409
408
410
409
To remove the featured status, you can update the library record with an empty list of labels (`[]`).
<Callouttype="note">Variables are supported in Sourcegraph v6.6 and more.</Callout>
437
436
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.
439
438
440
439
<Callouttype="note">You cannot use a variable for the batch change name.</Callout>
441
440
@@ -464,4 +463,4 @@ libraryVariables: [{
464
463
}
465
464
```
466
465
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.
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.
46
46
47
47
### Choose a name for your batch change
48
48
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.
@@ -64,7 +64,7 @@ The library contains examples that you can apply right into your batch spec if y
64
64
65
65
### Executing your batch spec
66
66
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:
68
68
69
69
- Run statistics at the top
70
70
- 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
82
82
83
83
### Previewing and applying the batch spec
84
84
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**.
86
86
87
87
Congratulations, you ran your first batch change server-side 🎊
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.
14
14
15
15
Start typing the keywords that match the batch change's title, and you will see a list of relevant results.
0 commit comments