Skip to content

docs/batches: Document batchChanges.restrictMergeToAdmins setting#1581

Open
keegancsmith wants to merge 2 commits intomainfrom
k/restrict-merge-to-admins-docs
Open

docs/batches: Document batchChanges.restrictMergeToAdmins setting#1581
keegancsmith wants to merge 2 commits 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.

@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 26, 2026 7:13am

Request Review

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 force-pushed the k/restrict-merge-to-admins-docs branch from 088e28c to 564ed57 Compare February 26, 2026 07:10
…ommit 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 <amp@ampcode.com>
@keegancsmith
Copy link
Member Author

@sourcegraph/code-plane ping for review please.


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

@burmudar burmudar Mar 19, 2026

Choose a reason for hiding this comment

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

minor: worth it to show a screenshot of button on how this will look?

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.

3 participants