[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Branch protection overview\n\nThis page describes branch protection in Secure Source Manager for\nadministrators.\n\nTo learn how to set up branch protection, follow the instructions in\n[Configure branch protection](/secure-source-manager/docs/configure-branch-protection).\n\nBranch protection prevents users from accidentally or maliciously pushing bad\ncode to an important branch. Repository administrators can configure branch\nprotection to block code submission to specific branches based on the following\ncriteria.\n\nRequire a pull request before merging\n-------------------------------------\n\nWhen enabled, a pull request must be created and approved by a configurable\nnumber of reviewers and approvers to merge into protected branches.\n\nReviewers and approvers are configured using IAM roles.\n\nReviewers\n: Must have at least the Secure Source Manager Repository Writer role\n (`roles/securesourcemanager.repoWriter`) on the protected repository.\n\nApprovers\n: Must have either the Repository Admin role\n (`roles/securesourcemanager.repoAdmin`) or both the Repository Writer role\n (`roles/securesourcemanager.repoWriter`) and the Repository Pull Request\n Approver role (`roles/securesourcemanager.repoPullRequestApprover`) on the\n protected repository.\n\nUsers with the Repository Admin role or the Repository Writer role who also have\nthe Repository Pull Request Approver role count as both an approver and reviewer\nwhen they approve a pull request.\n\n### Block merge on stale reviews\n\nWhen enabled, commits added to a pull request after a review or approval has\nbeen granted will block the merge. New reviews and approvals must be granted\nbefore the pull request can be merged into the protected branch.\n\nEnabled by default in all branch protection rules.\n\nRequire review comments to be resolved before merging\n-----------------------------------------------------\n\nWhen enabled, all comments and requests for changes on the pull request must be\nresolved before it can be merged into the protected branch.\n\nRequire linear history\n----------------------\n\nWhen enabled, pull requests that would introduce merge commits are blocked.\n\nMaintaining a linear Git history has many benefits, including making it simpler\nto understand what each commit does.\n\nRequire status checks\n---------------------\n\nWhen enabled, you can require a successful [build status](/secure-source-manager/docs/create-triggers-file#build-status) for\ntriggers defined in your [triggers](/secure-source-manager/docs/triggers-file-schema) file before a pull\nrequest can be merged into a protected branch.\n\nWhat's next\n-----------\n\n- [Configure branch protection](/secure-source-manager/docs/configure-branch-protection)\n- [Connect to Cloud Build](/secure-source-manager/docs/connect-cloud-build)"]]