AWS SDK Version 4 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

A PullRequestBuildPolicy object that defines comment-based approval requirements for triggering builds on pull requests. This policy helps control when automated builds are executed based on contributor permissions and approval workflows.

Inheritance Hierarchy

System.Object
  Amazon.CodeBuild.Model.PullRequestBuildPolicy

Namespace: Amazon.CodeBuild.Model
Assembly: AWSSDK.CodeBuild.dll
Version: 3.x.y.z

Syntax

C#
public class PullRequestBuildPolicy

The PullRequestBuildPolicy type exposes the following members

Constructors

NameDescription
Public Method PullRequestBuildPolicy()

Properties

NameTypeDescription
Public Property ApproverRoles System.Collections.Generic.List<System.String>

Gets and sets the property ApproverRoles.

List of repository roles that have approval privileges for pull request builds when comment approval is required. Only users with these roles can provide valid comment approvals. If a pull request contributor is one of these roles, their pull request builds will trigger automatically. This field is only applicable when requiresCommentApproval is not DISABLED.

Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.

Public Property RequiresCommentApproval Amazon.CodeBuild.PullRequestBuildCommentApproval

Gets and sets the property RequiresCommentApproval.

Specifies when comment-based approval is required before triggering a build on pull requests. This setting determines whether builds run automatically or require explicit approval through comments.

  • DISABLED: Builds trigger automatically without requiring comment approval

  • ALL_PULL_REQUESTS: All pull requests require comment approval before builds execute (unless contributor is one of the approver roles)

  • FORK_PULL_REQUESTS: Only pull requests from forked repositories require comment approval (unless contributor is one of the approver roles)

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.7.2 and newer