BranchProtectionV3Args

data class BranchProtectionV3Args(val branch: Output<String>? = null, val enforceAdmins: Output<Boolean>? = null, val repository: Output<String>? = null, val requireConversationResolution: Output<Boolean>? = null, val requireSignedCommits: Output<Boolean>? = null, val requiredPullRequestReviews: Output<BranchProtectionV3RequiredPullRequestReviewsArgs>? = null, val requiredStatusChecks: Output<BranchProtectionV3RequiredStatusChecksArgs>? = null, val restrictions: Output<BranchProtectionV3RestrictionsArgs>? = null) : ConvertibleToJava<BranchProtectionV3Args>

Protects a GitHub branch. The github.BranchProtection resource has moved to the GraphQL API, while this resource will continue to leverage the REST API. This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured.

Import

GitHub Branch Protection can be imported using an ID made up of repository:branch, e.g.

$ pulumi import github:index/branchProtectionV3:BranchProtectionV3 terraform terraform:main

Constructors

Link copied to clipboard
constructor(branch: Output<String>? = null, enforceAdmins: Output<Boolean>? = null, repository: Output<String>? = null, requireConversationResolution: Output<Boolean>? = null, requireSignedCommits: Output<Boolean>? = null, requiredPullRequestReviews: Output<BranchProtectionV3RequiredPullRequestReviewsArgs>? = null, requiredStatusChecks: Output<BranchProtectionV3RequiredStatusChecksArgs>? = null, restrictions: Output<BranchProtectionV3RestrictionsArgs>? = null)

Properties

Link copied to clipboard
val branch: Output<String>? = null

The Git branch to protect.

Link copied to clipboard
val enforceAdmins: Output<Boolean>? = null

Boolean, setting this to true enforces status checks for repository administrators.

Link copied to clipboard
val repository: Output<String>? = null

The GitHub repository name.

Link copied to clipboard

Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged.

Link copied to clipboard

Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.

Link copied to clipboard

Enforce restrictions for required status checks. See Required Status Checks below for details.

Link copied to clipboard
val requireSignedCommits: Output<Boolean>? = null

Boolean, setting this to true requires all commits to be signed with GPG.

Link copied to clipboard

Enforce restrictions for the users and teams that may push to the branch. See Restrictions below for details.

Functions

Link copied to clipboard
open override fun toJava(): BranchProtectionV3Args