Skip to content

Commit a7798f3

Browse files
author
awstools
committed
feat(client-codebuild): AWS CodeBuild now supports global and organization GitHub webhooks
1 parent 76ace8f commit a7798f3

File tree

8 files changed

+162
-1
lines changed

8 files changed

+162
-1
lines changed

Diff for: clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
181181
* // buildType: "BUILD" || "BUILD_BATCH",
182182
* // manualCreation: true || false,
183183
* // lastModifiedSecret: new Date("TIMESTAMP"),
184+
* // scopeConfiguration: { // ScopeConfiguration
185+
* // name: "STRING_VALUE", // required
186+
* // domain: "STRING_VALUE",
187+
* // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
188+
* // },
184189
* // },
185190
* // vpcConfig: { // VpcConfig
186191
* // vpcId: "STRING_VALUE",

Diff for: clients/client-codebuild/src/commands/CreateProjectCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
338338
* // buildType: "BUILD" || "BUILD_BATCH",
339339
* // manualCreation: true || false,
340340
* // lastModifiedSecret: new Date("TIMESTAMP"),
341+
* // scopeConfiguration: { // ScopeConfiguration
342+
* // name: "STRING_VALUE", // required
343+
* // domain: "STRING_VALUE",
344+
* // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
345+
* // },
341346
* // },
342347
* // vpcConfig: { // VpcConfig
343348
* // vpcId: "STRING_VALUE",

Diff for: clients/client-codebuild/src/commands/CreateWebhookCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad
5959
* ],
6060
* buildType: "BUILD" || "BUILD_BATCH",
6161
* manualCreation: true || false,
62+
* scopeConfiguration: { // ScopeConfiguration
63+
* name: "STRING_VALUE", // required
64+
* domain: "STRING_VALUE",
65+
* scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
66+
* },
6267
* };
6368
* const command = new CreateWebhookCommand(input);
6469
* const response = await client.send(command);
@@ -80,6 +85,11 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad
8085
* // buildType: "BUILD" || "BUILD_BATCH",
8186
* // manualCreation: true || false,
8287
* // lastModifiedSecret: new Date("TIMESTAMP"),
88+
* // scopeConfiguration: { // ScopeConfiguration
89+
* // name: "STRING_VALUE", // required
90+
* // domain: "STRING_VALUE",
91+
* // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
92+
* // },
8393
* // },
8494
* // };
8595
*

Diff for: clients/client-codebuild/src/commands/UpdateProjectCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,11 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
338338
* // buildType: "BUILD" || "BUILD_BATCH",
339339
* // manualCreation: true || false,
340340
* // lastModifiedSecret: new Date("TIMESTAMP"),
341+
* // scopeConfiguration: { // ScopeConfiguration
342+
* // name: "STRING_VALUE", // required
343+
* // domain: "STRING_VALUE",
344+
* // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
345+
* // },
341346
* // },
342347
* // vpcConfig: { // VpcConfig
343348
* // vpcId: "STRING_VALUE",

Diff for: clients/client-codebuild/src/commands/UpdateWebhookCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export interface UpdateWebhookCommandOutput extends UpdateWebhookOutput, __Metad
7474
* // buildType: "BUILD" || "BUILD_BATCH",
7575
* // manualCreation: true || false,
7676
* // lastModifiedSecret: new Date("TIMESTAMP"),
77+
* // scopeConfiguration: { // ScopeConfiguration
78+
* // name: "STRING_VALUE", // required
79+
* // domain: "STRING_VALUE",
80+
* // scope: "GITHUB_ORGANIZATION" || "GITHUB_GLOBAL", // required
81+
* // },
7782
* // },
7883
* // };
7984
*

Diff for: clients/client-codebuild/src/models/models_0.ts

+68
Original file line numberDiff line numberDiff line change
@@ -3617,6 +3617,18 @@ export interface WebhookFilter {
36173617
* </ul>
36183618
* </li>
36193619
* <li>
3620+
* <p>REPOSITORY_NAME</p>
3621+
* <ul>
3622+
* <li>
3623+
* <p>A webhook triggers a build when the repository name matches the
3624+
* regular expression pattern.</p>
3625+
* <note>
3626+
* <p> Works with GitHub global or organization webhooks only. </p>
3627+
* </note>
3628+
* </li>
3629+
* </ul>
3630+
* </li>
3631+
* <li>
36203632
* <p>WORKFLOW_NAME</p>
36213633
* <ul>
36223634
* <li>
@@ -3657,6 +3669,44 @@ export interface WebhookFilter {
36573669
excludeMatchedPattern?: boolean;
36583670
}
36593671

3672+
/**
3673+
* @public
3674+
* @enum
3675+
*/
3676+
export const WebhookScopeType = {
3677+
GITHUB_GLOBAL: "GITHUB_GLOBAL",
3678+
GITHUB_ORGANIZATION: "GITHUB_ORGANIZATION",
3679+
} as const;
3680+
3681+
/**
3682+
* @public
3683+
*/
3684+
export type WebhookScopeType = (typeof WebhookScopeType)[keyof typeof WebhookScopeType];
3685+
3686+
/**
3687+
* <p>Contains configuration information about the scope for a webhook. </p>
3688+
* @public
3689+
*/
3690+
export interface ScopeConfiguration {
3691+
/**
3692+
* <p>The name of either the enterprise or organization that will send webhook events to CodeBuild, depending on if the webhook is a global or organization webhook respectively.</p>
3693+
* @public
3694+
*/
3695+
name: string | undefined;
3696+
3697+
/**
3698+
* <p>The domain of the GitHub Enterprise organization. Note that this parameter is only required if your project's source type is GITHUB_ENTERPRISE</p>
3699+
* @public
3700+
*/
3701+
domain?: string;
3702+
3703+
/**
3704+
* <p>The type of scope for a GitHub webhook.</p>
3705+
* @public
3706+
*/
3707+
scope: WebhookScopeType | undefined;
3708+
}
3709+
36603710
/**
36613711
* <p>Information about a webhook that connects repository events to a build project in
36623712
* CodeBuild.</p>
@@ -3730,6 +3780,15 @@ export interface Webhook {
37303780
* @public
37313781
*/
37323782
lastModifiedSecret?: Date;
3783+
3784+
/**
3785+
* <p>The scope configuration for global or organization webhooks.</p>
3786+
* <note>
3787+
* <p>Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.</p>
3788+
* </note>
3789+
* @public
3790+
*/
3791+
scopeConfiguration?: ScopeConfiguration;
37333792
}
37343793

37353794
/**
@@ -5016,6 +5075,15 @@ export interface CreateWebhookInput {
50165075
* @public
50175076
*/
50185077
manualCreation?: boolean;
5078+
5079+
/**
5080+
* <p>The scope configuration for global or organization webhooks.</p>
5081+
* <note>
5082+
* <p>Global or organization webhooks are only available for GitHub and Github Enterprise webhooks.</p>
5083+
* </note>
5084+
* @public
5085+
*/
5086+
scopeConfiguration?: ScopeConfiguration;
50195087
}
50205088

50215089
/**

Diff for: clients/client-codebuild/src/protocols/Aws_json1_1.ts

+6
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ import {
216216
S3ReportExportConfig,
217217
ScalingConfigurationInput,
218218
ScalingConfigurationOutput,
219+
ScopeConfiguration,
219220
SourceAuth,
220221
StartBuildBatchInput,
221222
StartBuildBatchOutput,
@@ -2199,6 +2200,8 @@ const se_ScalingConfigurationInput = (input: ScalingConfigurationInput, context:
21992200
});
22002201
};
22012202

2203+
// se_ScopeConfiguration omitted.
2204+
22022205
// se_SecurityGroupIds omitted.
22032206

22042207
// se_SourceAuth omitted.
@@ -3001,6 +3004,8 @@ const de_ScalingConfigurationOutput = (output: any, context: __SerdeContext): Sc
30013004
}) as any;
30023005
};
30033006

3007+
// de_ScopeConfiguration omitted.
3008+
30043009
// de_SecurityGroupIds omitted.
30053010

30063011
// de_SourceAuth omitted.
@@ -3160,6 +3165,7 @@ const de_Webhook = (output: any, context: __SerdeContext): Webhook => {
31603165
lastModifiedSecret: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
31613166
manualCreation: __expectBoolean,
31623167
payloadUrl: __expectString,
3168+
scopeConfiguration: _json,
31633169
secret: __expectString,
31643170
url: __expectString,
31653171
}) as any;

Diff for: codegen/sdk-codegen/aws-models/codebuild.json

+58-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)