Updates the webhook associated with an CodeBuild build project¶
Description¶
Updates the webhook associated with an CodeBuild build project.
If you use Bitbucket for your repository, rotateSecret is ignored.
Usage¶
codebuild_update_webhook(projectName, branchFilter, rotateSecret,
filterGroups, buildType, pullRequestBuildPolicy)
Arguments¶
-
projectName[required] The name of the CodeBuild project.
-
branchFilterA regular expression used to determine which repository branches are built when a webhook is triggered. If the name of a branch matches the regular expression, then it is built. If
branchFilteris empty, then all branches are built.It is recommended that you use
filterGroupsinstead ofbranchFilter. -
rotateSecretA boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you use Bitbucket for your repository,
rotateSecretis ignored. -
filterGroupsAn array of arrays of
WebhookFilterobjects used to determine if a webhook event can trigger a build. A filter group must contain at least oneEVENTWebhookFilter. -
buildTypeSpecifies the type of build this webhook will trigger.
RUNNER_BUILDKITE_BUILDis only available forNO_SOURCEsource type projects configured for Buildkite runner builds. For more information about CodeBuild-hosted Buildkite runner builds, see Tutorial: Configure a CodeBuild-hosted Buildkite runner in the CodeBuild user guide. -
pullRequestBuildPolicyA 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.
Value¶
A list with the following syntax:
list(
webhook = list(
url = "string",
payloadUrl = "string",
secret = "string",
branchFilter = "string",
filterGroups = list(
list(
list(
type = "EVENT"|"BASE_REF"|"HEAD_REF"|"ACTOR_ACCOUNT_ID"|"FILE_PATH"|"COMMIT_MESSAGE"|"WORKFLOW_NAME"|"TAG_NAME"|"RELEASE_NAME"|"REPOSITORY_NAME"|"ORGANIZATION_NAME",
pattern = "string",
excludeMatchedPattern = TRUE|FALSE
)
)
),
buildType = "BUILD"|"BUILD_BATCH"|"RUNNER_BUILDKITE_BUILD",
manualCreation = TRUE|FALSE,
lastModifiedSecret = as.POSIXct(
"2015-01-01"
),
scopeConfiguration = list(
name = "string",
domain = "string",
scope = "GITHUB_ORGANIZATION"|"GITHUB_GLOBAL"|"GITLAB_GROUP"
),
status = "CREATING"|"CREATE_FAILED"|"ACTIVE"|"DELETING",
statusMessage = "string",
pullRequestBuildPolicy = list(
requiresCommentApproval = "DISABLED"|"ALL_PULL_REQUESTS"|"FORK_PULL_REQUESTS",
approverRoles = list(
"GITHUB_READ"|"GITHUB_TRIAGE"|"GITHUB_WRITE"|"GITHUB_MAINTAIN"|"GITHUB_ADMIN"|"GITLAB_GUEST"|"GITLAB_PLANNER"|"GITLAB_REPORTER"|"GITLAB_DEVELOPER"|"GITLAB_MAINTAINER"|"GITLAB_OWNER"|"BITBUCKET_READ"|"BITBUCKET_WRITE"|"BITBUCKET_ADMIN"
)
)
)
)
Request syntax¶
svc$update_webhook(
projectName = "string",
branchFilter = "string",
rotateSecret = TRUE|FALSE,
filterGroups = list(
list(
list(
type = "EVENT"|"BASE_REF"|"HEAD_REF"|"ACTOR_ACCOUNT_ID"|"FILE_PATH"|"COMMIT_MESSAGE"|"WORKFLOW_NAME"|"TAG_NAME"|"RELEASE_NAME"|"REPOSITORY_NAME"|"ORGANIZATION_NAME",
pattern = "string",
excludeMatchedPattern = TRUE|FALSE
)
)
),
buildType = "BUILD"|"BUILD_BATCH"|"RUNNER_BUILDKITE_BUILD",
pullRequestBuildPolicy = list(
requiresCommentApproval = "DISABLED"|"ALL_PULL_REQUESTS"|"FORK_PULL_REQUESTS",
approverRoles = list(
"GITHUB_READ"|"GITHUB_TRIAGE"|"GITHUB_WRITE"|"GITHUB_MAINTAIN"|"GITHUB_ADMIN"|"GITLAB_GUEST"|"GITLAB_PLANNER"|"GITLAB_REPORTER"|"GITLAB_DEVELOPER"|"GITLAB_MAINTAINER"|"GITLAB_OWNER"|"BITBUCKET_READ"|"BITBUCKET_WRITE"|"BITBUCKET_ADMIN"
)
)
)