Skip to main content
Glama

update_branch_protection

Configure branch protection rules to enforce code quality standards, require reviews, and prevent unauthorized changes in GitHub repositories.

Instructions

Update branch protection rules for a branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
branchYesBranch name (e.g. 'main')
required_status_checks_strictNoRequire branches to be up to date before merging
required_status_checks_contextsNoList of status check contexts required (e.g. ['ci/tests'])
enforce_adminsNoEnforce restrictions for administrators
required_approving_review_countNoNumber of required approving reviews (0-6)
dismiss_stale_reviewsNoDismiss stale pull request approvals when new commits are pushed
require_code_owner_reviewsNoRequire review from code owners
require_last_push_approvalNoRequire approval from someone other than the last pusher
required_linear_historyNoRequire linear commit history (no merge commits)
allow_force_pushesNoAllow force pushes to the protected branch
allow_deletionsNoAllow the protected branch to be deleted
block_creationsNoBlock branch creation that matches the protection pattern
required_conversation_resolutionNoRequire conversation resolution before merging
lock_branchNoLock the branch (make it read-only)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-engineer-mj/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server