Skip to content

Commit 074bc17

Browse files
author
AWS
committed
AWS CodeBuild Update: AWS CodeBuild now supports comment-based pull request control.
1 parent 7c2d88b commit 074bc17

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS CodeBuild",
4+
"contributor": "",
5+
"description": "AWS CodeBuild now supports comment-based pull request control."
6+
}

services/codebuild/src/main/resources/codegen-resources/service-2.json

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,10 @@
21222122
"scopeConfiguration":{
21232123
"shape":"ScopeConfiguration",
21242124
"documentation":"<p>The scope configuration for global or organization webhooks.</p> <note> <p>Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.</p> </note>"
2125+
},
2126+
"pullRequestBuildPolicy":{
2127+
"shape":"PullRequestBuildPolicy",
2128+
"documentation":"<p>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.</p>"
21252129
}
21262130
}
21272131
},
@@ -4012,6 +4016,52 @@
40124016
},
40134017
"documentation":"<p>Information about the proxy configurations that apply network access control to your reserved capacity instances.</p>"
40144018
},
4019+
"PullRequestBuildApproverRole":{
4020+
"type":"string",
4021+
"enum":[
4022+
"GITHUB_READ",
4023+
"GITHUB_TRIAGE",
4024+
"GITHUB_WRITE",
4025+
"GITHUB_MAINTAIN",
4026+
"GITHUB_ADMIN",
4027+
"GITLAB_GUEST",
4028+
"GITLAB_PLANNER",
4029+
"GITLAB_REPORTER",
4030+
"GITLAB_DEVELOPER",
4031+
"GITLAB_MAINTAINER",
4032+
"GITLAB_OWNER",
4033+
"BITBUCKET_READ",
4034+
"BITBUCKET_WRITE",
4035+
"BITBUCKET_ADMIN"
4036+
]
4037+
},
4038+
"PullRequestBuildApproverRoles":{
4039+
"type":"list",
4040+
"member":{"shape":"PullRequestBuildApproverRole"}
4041+
},
4042+
"PullRequestBuildCommentApproval":{
4043+
"type":"string",
4044+
"enum":[
4045+
"DISABLED",
4046+
"ALL_PULL_REQUESTS",
4047+
"FORK_PULL_REQUESTS"
4048+
]
4049+
},
4050+
"PullRequestBuildPolicy":{
4051+
"type":"structure",
4052+
"required":["requiresCommentApproval"],
4053+
"members":{
4054+
"requiresCommentApproval":{
4055+
"shape":"PullRequestBuildCommentApproval",
4056+
"documentation":"<p>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.</p> <ul> <li> <p> <i>DISABLED</i>: Builds trigger automatically without requiring comment approval</p> </li> <li> <p> <i>ALL_PULL_REQUESTS</i>: All pull requests require comment approval before builds execute (unless contributor is one of the approver roles)</p> </li> <li> <p> <i>FORK_PULL_REQUESTS</i>: Only pull requests from forked repositories require comment approval (unless contributor is one of the approver roles)</p> </li> </ul>"
4057+
},
4058+
"approverRoles":{
4059+
"shape":"PullRequestBuildApproverRoles",
4060+
"documentation":"<p>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 <code>requiresCommentApproval</code> is not <i>DISABLED</i>.</p>"
4061+
}
4062+
},
4063+
"documentation":"<p>Configuration policy 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.</p>"
4064+
},
40154065
"PutResourcePolicyInput":{
40164066
"type":"structure",
40174067
"required":[
@@ -4968,7 +5018,7 @@
49685018
},
49695019
"buildspecOverride":{
49705020
"shape":"String",
4971-
"documentation":"<p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p> <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage\">Buildspec File Name and Storage Location</a>.</p> <note> <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket.</p> </note>"
5021+
"documentation":"<p>A buildspec file declaration that overrides the latest one defined in the build project, for this build only. The buildspec defined on the project is not changed.</p> <p>If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in <code>CODEBUILD_SRC_DIR</code> environment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example, <code>arn:aws:s3:::my-codebuild-sample2/buildspec.yml</code>). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-name-storage\">Buildspec File Name and Storage Location</a>.</p> <note> <p>Since this property allows you to change the build commands that will run in the container, you should note that an IAM principal with the ability to call this API and set this parameter can override the default settings. Moreover, we encourage that you use a trustworthy buildspec location like a file in your source repository or a Amazon S3 bucket. Alternatively, you can restrict overrides to the buildspec by using a condition key: <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/action-context-keys.html#action-context-keys-example-overridebuildspec.html\">Prevent unauthorized modifications to project buildspec</a>.</p> </note>"
49725022
},
49735023
"insecureSslOverride":{
49745024
"shape":"WrapperBoolean",
@@ -5572,6 +5622,10 @@
55725622
"buildType":{
55735623
"shape":"WebhookBuildType",
55745624
"documentation":"<p>Specifies the type of build this webhook will trigger.</p> <note> <p> <code>RUNNER_BUILDKITE_BUILD</code> is only available for <code>NO_SOURCE</code> source type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see <a href=\"https://docs.aws.amazon.com/codebuild/latest/userguide/sample-runner-buildkite.html\">Tutorial: Configure a CodeBuild-hosted Buildkite runner</a> in the <i>CodeBuild user guide</i>.</p> </note>"
5625+
},
5626+
"pullRequestBuildPolicy":{
5627+
"shape":"PullRequestBuildPolicy",
5628+
"documentation":"<p>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.</p>"
55755629
}
55765630
}
55775631
},

0 commit comments

Comments
 (0)