Skip to content

Commit

Permalink
feat(client-codebuild): Add new webhook filter types for GitHub webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Apr 9, 2024
1 parent 59e2f13 commit e78df26
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
* // filterGroups: [ // FilterGroups
* // [ // FilterGroup
* // { // WebhookFilter
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* // pattern: "STRING_VALUE", // required
* // excludeMatchedPattern: true || false,
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* // filterGroups: [ // FilterGroups
* // [ // FilterGroup
* // { // WebhookFilter
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* // pattern: "STRING_VALUE", // required
* // excludeMatchedPattern: true || false,
* // },
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codebuild/src/commands/CreateWebhookCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad
* filterGroups: [ // FilterGroups
* [ // FilterGroup
* { // WebhookFilter
* type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* pattern: "STRING_VALUE", // required
* excludeMatchedPattern: true || false,
* },
Expand All @@ -69,7 +69,7 @@ export interface CreateWebhookCommandOutput extends CreateWebhookOutput, __Metad
* // filterGroups: [ // FilterGroups
* // [ // FilterGroup
* // { // WebhookFilter
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* // pattern: "STRING_VALUE", // required
* // excludeMatchedPattern: true || false,
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* // filterGroups: [ // FilterGroups
* // [ // FilterGroup
* // { // WebhookFilter
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* // pattern: "STRING_VALUE", // required
* // excludeMatchedPattern: true || false,
* // },
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codebuild/src/commands/UpdateWebhookCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface UpdateWebhookCommandOutput extends UpdateWebhookOutput, __Metad
* filterGroups: [ // FilterGroups
* [ // FilterGroup
* { // WebhookFilter
* type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* pattern: "STRING_VALUE", // required
* excludeMatchedPattern: true || false,
* },
Expand All @@ -64,7 +64,7 @@ export interface UpdateWebhookCommandOutput extends UpdateWebhookOutput, __Metad
* // filterGroups: [ // FilterGroups
* // [ // FilterGroup
* // { // WebhookFilter
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE", // required
* // type: "EVENT" || "BASE_REF" || "HEAD_REF" || "ACTOR_ACCOUNT_ID" || "FILE_PATH" || "COMMIT_MESSAGE" || "WORKFLOW_NAME" || "TAG_NAME" || "RELEASE_NAME", // required
* // pattern: "STRING_VALUE", // required
* // excludeMatchedPattern: true || false,
* // },
Expand Down
31 changes: 24 additions & 7 deletions clients/client-codebuild/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,7 @@ export interface ProjectSource {
* that contains the source and the buildspec file. You must connect your Amazon Web Services account
* to your GitLab account. Use the CodeBuild console to start creating a build
* project. When you use the console to connect (or reconnect) with GitLab, on the
* Connections <b>Authorize application</b> page, choose <b>Authorize</b>. Then on the CodeStar Connections <b>Create GitLab connection</b> page,
* Connections <b>Authorize application</b> page, choose <b>Authorize</b>. Then on the CodeConnections <b>Create GitLab connection</b> page,
* choose <b>Connect to GitLab</b>. (After you have connected to your GitLab account,
* you do not need to finish creating the build project. You can leave the CodeBuild
* console.) To instruct CodeBuild to override the default connection and use this connection instead,
Expand Down Expand Up @@ -3460,6 +3460,9 @@ export const WebhookFilterType = {
EVENT: "EVENT",
FILE_PATH: "FILE_PATH",
HEAD_REF: "HEAD_REF",
RELEASE_NAME: "RELEASE_NAME",
TAG_NAME: "TAG_NAME",
WORKFLOW_NAME: "WORKFLOW_NAME",
} as const;

/**
Expand All @@ -3473,9 +3476,10 @@ export type WebhookFilterType = (typeof WebhookFilterType)[keyof typeof WebhookF
*/
export interface WebhookFilter {
/**
* <p> The type of webhook filter. There are eight webhook filter types: <code>EVENT</code>,
* <p> The type of webhook filter. There are nine webhook filter types: <code>EVENT</code>,
* <code>ACTOR_ACCOUNT_ID</code>, <code>HEAD_REF</code>, <code>BASE_REF</code>,
* <code>FILE_PATH</code>, <code>COMMIT_MESSAGE</code>, <code>TAG_NAME</code>, and <code>RELEASE_NAME</code>. </p>
* <code>FILE_PATH</code>, <code>COMMIT_MESSAGE</code>, <code>TAG_NAME</code>, <code>RELEASE_NAME</code>,
* and <code>WORKFLOW_NAME</code>. </p>
* <ul>
* <li>
* <p>
Expand All @@ -3484,17 +3488,18 @@ export interface WebhookFilter {
* <ul>
* <li>
* <p> A webhook event triggers a build when the provided <code>pattern</code>
* matches one of eight event types: <code>PUSH</code>,
* matches one of nine event types: <code>PUSH</code>,
* <code>PULL_REQUEST_CREATED</code>, <code>PULL_REQUEST_UPDATED</code>,
* <code>PULL_REQUEST_CLOSED</code>, <code>PULL_REQUEST_REOPENED</code>,
* <code>PULL_REQUEST_MERGED</code>, <code>RELEASED</code>, and <code>PRERELEASED</code>. The <code>EVENT</code> patterns are
* <code>PULL_REQUEST_MERGED</code>, <code>RELEASED</code>, <code>PRERELEASED</code>,
* and <code>WORKFLOW_JOB_QUEUED</code>. The <code>EVENT</code> patterns are
* specified as a comma-separated string. For example, <code>PUSH,
* PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED</code> filters all push, pull
* request created, and pull request updated events. </p>
* <note>
* <p> The <code>PULL_REQUEST_REOPENED</code> works with GitHub and GitHub
* Enterprise only. The <code>RELEASED</code> and <code>PRERELEASED</code> work
* with GitHub only.</p>
* Enterprise only. The <code>RELEASED</code>, <code>PRERELEASED</code>,
* and <code>WORKFLOW_JOB_QUEUED</code> work with GitHub only.</p>
* </note>
* </li>
* </ul>
Expand Down Expand Up @@ -3588,6 +3593,18 @@ export interface WebhookFilter {
* </li>
* </ul>
* </li>
* <li>
* <p>WORKFLOW_NAME</p>
* <ul>
* <li>
* <p>A webhook triggers a build when the workflow name matches the
* regular expression <code>pattern</code>.</p>
* <note>
* <p> Works with <code>WORKFLOW_JOB_QUEUED</code> events only. </p>
* </note>
* </li>
* </ul>
* </li>
* </ul>
* @public
*/
Expand Down
Loading

0 comments on commit e78df26

Please sign in to comment.