Skip to content

docs/batches: Document batchChanges.restrictMergeToAdmins setting#1581

Open
keegancsmith wants to merge 1 commit intomainfrom
k/restrict-merge-to-admins-docs
Open

docs/batches: Document batchChanges.restrictMergeToAdmins setting#1581
keegancsmith wants to merge 1 commit intomainfrom
k/restrict-merge-to-admins-docs

Conversation

@keegancsmith
Copy link
Member

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.

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 <amp@ampcode.com>
@keegancsmith keegancsmith requested a review from a team February 3, 2026 11:35
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sourcegraph-docs Ready Ready Preview, Comment Feb 3, 2026 11:37am

Request Review


### 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`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend linking to https://sourcegraph.com/docs/batch-changes/configuring-credentials#github-apps for setting up github apps credentials, instead of linking to the chapter dedicated to commit signing.


## 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants