From 564ed574394e62a9d11a9c2179c10f2c1c78edc8 Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Tue, 3 Feb 2026 13:34:40 +0200 Subject: [PATCH 1/2] docs/batches: Document batchChanges.restrictMergeToAdmins setting Adds documentation for the new batchChanges.restrictMergeToAdmins site config option which restricts merge and auto-merge actions to site admins only. This is useful when using the Batch Changes GitHub App with elevated access, where the App may have write permissions to repositories that individual users do not. See sourcegraph/sourcegraph#9559 Note: This PR should only be merged once Sourcegraph 6.13 is released. Amp-Thread-ID: https://ampcode.com/threads/T-019c2344-7386-702e-8b12-7ec2de618f53 Co-authored-by: Amp --- docs/admin/config/batch-changes.mdx | 12 ++++++++++++ docs/admin/config/site-config.mdx | 3 +-- docs/batch-changes/permissions-in-batch-changes.mdx | 6 ++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/admin/config/batch-changes.mdx b/docs/admin/config/batch-changes.mdx index 3d783ccae..0cebebb7d 100644 --- a/docs/admin/config/batch-changes.mdx +++ b/docs/admin/config/batch-changes.mdx @@ -10,6 +10,18 @@ Batch Changes is [RBAC-enabled](/admin/access-control/) Date: Thu, 26 Feb 2026 09:10:40 +0200 Subject: [PATCH 2/2] fix/docs: link GitHub App references to credentials page instead of commit signing The reviewer correctly pointed out that the GitHub App links should direct users to the credentials setup page rather than the commit signing section, since the context is about configuring GitHub App credentials with elevated access, not commit signing. Test Plan: Verified links point to /batch-changes/configuring-credentials#github-apps Amp-Thread-ID: https://ampcode.com/threads/T-019c98c8-5f5c-73b9-bea8-e7d43529910c Co-authored-by: Amp --- docs/admin/config/batch-changes.mdx | 2 +- docs/batch-changes/permissions-in-batch-changes.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/admin/config/batch-changes.mdx b/docs/admin/config/batch-changes.mdx index 0cebebb7d..ebfbb2121 100644 --- a/docs/admin/config/batch-changes.mdx +++ b/docs/admin/config/batch-changes.mdx @@ -12,7 +12,7 @@ By default, only a batch change's author or a site admin can administer (apply, ### Restrict merge actions to site admins -When using the [Batch Changes GitHub App](#commit-signing-with-github-apps) with elevated access, the App may have write access to repositories that individual users do not. To restrict who can merge changesets via the Batch Changes UI, set the `batchChanges.restrictMergeToAdmins` site configuration option to `true`: +When using the [Batch Changes GitHub App](/batch-changes/configuring-credentials#github-apps) with elevated access, the App may have write access to repositories that individual users do not. To restrict who can merge changesets via the Batch Changes UI, set the `batchChanges.restrictMergeToAdmins` site configuration option to `true`: ```json { diff --git a/docs/batch-changes/permissions-in-batch-changes.mdx b/docs/batch-changes/permissions-in-batch-changes.mdx index 11dffce98..f695a424f 100644 --- a/docs/batch-changes/permissions-in-batch-changes.mdx +++ b/docs/batch-changes/permissions-in-batch-changes.mdx @@ -93,6 +93,6 @@ A site admin can disable batch changes for regular users by setting the [site co ## Restricting merge actions to site admins -When using the [Batch Changes GitHub App](/admin/config/batch-changes#commit-signing-with-github-apps) with elevated access, the App may have write access to repositories that individual users do not. To prevent non-admin users from merging changesets through the Batch Changes UI in repositories they wouldn't normally have merge permissions for, a site admin can set the [site configuration](/admin/config/site-config) property `"batchChanges.restrictMergeToAdmins"` to `true`. +When using the [Batch Changes GitHub App](/batch-changes/configuring-credentials#github-apps) with elevated access, the App may have write access to repositories that individual users do not. To prevent non-admin users from merging changesets through the Batch Changes UI in repositories they wouldn't normally have merge permissions for, a site admin can set the [site configuration](/admin/config/site-config) property `"batchChanges.restrictMergeToAdmins"` to `true`. When enabled, only site admins can use the "Merge changesets" and "Enable auto-merge" actions. Non-admin users will see an error directing them to contact a site admin to perform these actions.