Class WorkflowTriggers.Builder
- java.lang.Object
-
- io.github.cdklabs.cdkpipelines.github.WorkflowTriggers.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<WorkflowTriggers>
- Enclosing interface:
- WorkflowTriggers
@Stability(Stable) public static final class WorkflowTriggers.Builder extends Object implements software.amazon.jsii.Builder<WorkflowTriggers>
A builder forWorkflowTriggers
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
checkRun
@Stability(Stable) public WorkflowTriggers.Builder checkRun(CheckRunOptions checkRun)
Sets the value ofWorkflowTriggers.getCheckRun()- Parameters:
checkRun- Runs your workflow anytime the check_run event occurs.- Returns:
this
-
checkSuite
@Stability(Stable) public WorkflowTriggers.Builder checkSuite(CheckSuiteOptions checkSuite)
Sets the value ofWorkflowTriggers.getCheckSuite()- Parameters:
checkSuite- Runs your workflow anytime the check_suite event occurs.- Returns:
this
-
create
@Stability(Stable) public WorkflowTriggers.Builder create(CreateOptions create)
Sets the value ofWorkflowTriggers.getCreate()- Parameters:
create- Runs your workflow anytime someone creates a branch or tag, which triggers the create event.- Returns:
this
-
delete
@Stability(Stable) public WorkflowTriggers.Builder delete(DeleteOptions delete)
Sets the value ofWorkflowTriggers.getDelete()- Parameters:
delete- Runs your workflow anytime someone deletes a branch or tag, which triggers the delete event.- Returns:
this
-
deployment
@Stability(Stable) public WorkflowTriggers.Builder deployment(DeploymentOptions deployment)
Sets the value ofWorkflowTriggers.getDeployment()- Parameters:
deployment- Runs your workflow anytime someone creates a deployment, which triggers the deployment event. Deployments created with a commit SHA may not have a Git ref.- Returns:
this
-
deploymentStatus
@Stability(Stable) public WorkflowTriggers.Builder deploymentStatus(DeploymentStatusOptions deploymentStatus)
Sets the value ofWorkflowTriggers.getDeploymentStatus()- Parameters:
deploymentStatus- Runs your workflow anytime a third party provides a deployment status, which triggers the deployment_status event. Deployments created with a commit SHA may not have a Git ref.- Returns:
this
-
fork
@Stability(Stable) public WorkflowTriggers.Builder fork(ForkOptions fork)
Sets the value ofWorkflowTriggers.getFork()- Parameters:
fork- Runs your workflow anytime when someone forks a repository, which triggers the fork event.- Returns:
this
-
gollum
@Stability(Stable) public WorkflowTriggers.Builder gollum(GollumOptions gollum)
Sets the value ofWorkflowTriggers.getGollum()- Parameters:
gollum- Runs your workflow when someone creates or updates a Wiki page, which triggers the gollum event.- Returns:
this
-
issueComment
@Stability(Stable) public WorkflowTriggers.Builder issueComment(IssueCommentOptions issueComment)
Sets the value ofWorkflowTriggers.getIssueComment()- Parameters:
issueComment- Runs your workflow anytime the issue_comment event occurs.- Returns:
this
-
issues
@Stability(Stable) public WorkflowTriggers.Builder issues(IssuesOptions issues)
Sets the value ofWorkflowTriggers.getIssues()- Parameters:
issues- Runs your workflow anytime the issues event occurs.- Returns:
this
-
label
@Stability(Stable) public WorkflowTriggers.Builder label(LabelOptions label)
Sets the value ofWorkflowTriggers.getLabel()- Parameters:
label- Runs your workflow anytime the label event occurs.- Returns:
this
-
milestone
@Stability(Stable) public WorkflowTriggers.Builder milestone(MilestoneOptions milestone)
Sets the value ofWorkflowTriggers.getMilestone()- Parameters:
milestone- Runs your workflow anytime the milestone event occurs.- Returns:
this
-
pageBuild
@Stability(Stable) public WorkflowTriggers.Builder pageBuild(PageBuildOptions pageBuild)
Sets the value ofWorkflowTriggers.getPageBuild()- Parameters:
pageBuild- Runs your workflow anytime someone pushes to a GitHub Pages-enabled branch, which triggers the page_build event.- Returns:
this
-
project
@Stability(Stable) public WorkflowTriggers.Builder project(ProjectOptions project)
Sets the value ofWorkflowTriggers.getProject()- Parameters:
project- Runs your workflow anytime the project event occurs.- Returns:
this
-
projectCard
@Stability(Stable) public WorkflowTriggers.Builder projectCard(ProjectCardOptions projectCard)
Sets the value ofWorkflowTriggers.getProjectCard()- Parameters:
projectCard- Runs your workflow anytime the project_card event occurs.- Returns:
this
-
projectColumn
@Stability(Stable) public WorkflowTriggers.Builder projectColumn(ProjectColumnOptions projectColumn)
Sets the value ofWorkflowTriggers.getProjectColumn()- Parameters:
projectColumn- Runs your workflow anytime the project_column event occurs.- Returns:
this
-
publicValue
@Stability(Stable) public WorkflowTriggers.Builder publicValue(PublicOptions publicValue)
Sets the value ofWorkflowTriggers.getPublicValue()- Parameters:
publicValue- Runs your workflow anytime someone makes a private repository public, which triggers the public event.- Returns:
this
-
pullRequest
@Stability(Stable) public WorkflowTriggers.Builder pullRequest(PullRequestOptions pullRequest)
Sets the value ofWorkflowTriggers.getPullRequest()- Parameters:
pullRequest- Runs your workflow anytime the pull_request event occurs.- Returns:
this
-
pullRequestReview
@Stability(Stable) public WorkflowTriggers.Builder pullRequestReview(PullRequestReviewOptions pullRequestReview)
Sets the value ofWorkflowTriggers.getPullRequestReview()- Parameters:
pullRequestReview- Runs your workflow anytime the pull_request_review event occurs.- Returns:
this
-
pullRequestReviewComment
@Stability(Stable) public WorkflowTriggers.Builder pullRequestReviewComment(PullRequestReviewCommentOptions pullRequestReviewComment)
Sets the value ofWorkflowTriggers.getPullRequestReviewComment()- Parameters:
pullRequestReviewComment- Runs your workflow anytime a comment on a pull request's unified diff is modified, which triggers the pull_request_review_comment event.- Returns:
this
-
pullRequestTarget
@Stability(Stable) public WorkflowTriggers.Builder pullRequestTarget(PullRequestTargetOptions pullRequestTarget)
Sets the value ofWorkflowTriggers.getPullRequestTarget()- Parameters:
pullRequestTarget- This event runs in the context of the base of the pull request, rather than in the merge commit as the pull_request event does. This prevents executing unsafe workflow code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows you to do things like create workflows that label and comment on pull requests based on the contents of the event payload.WARNING: The
pull_request_targetevent is granted read/write repository token and can access secrets, even when it is triggered from a fork. Although the workflow runs in the context of the base of the pull request, you should make sure that you do not check out, build, or run untrusted code from the pull request with this event. Additionally, any caches share the same scope as the base branch, and to help prevent cache poisoning, you should not save the cache if there is a possibility that the cache contents were altered.- Returns:
this
-
push
@Stability(Stable) public WorkflowTriggers.Builder push(PushOptions push)
Sets the value ofWorkflowTriggers.getPush()- Parameters:
push- Runs your workflow when someone pushes to a repository branch, which triggers the push event.- Returns:
this
-
registryPackage
@Stability(Stable) public WorkflowTriggers.Builder registryPackage(RegistryPackageOptions registryPackage)
Sets the value ofWorkflowTriggers.getRegistryPackage()- Parameters:
registryPackage- Runs your workflow anytime a package is published or updated.- Returns:
this
-
release
@Stability(Stable) public WorkflowTriggers.Builder release(ReleaseOptions release)
Sets the value ofWorkflowTriggers.getRelease()- Parameters:
release- Runs your workflow anytime the release event occurs.- Returns:
this
-
repositoryDispatch
@Stability(Stable) public WorkflowTriggers.Builder repositoryDispatch(RepositoryDispatchOptions repositoryDispatch)
Sets the value ofWorkflowTriggers.getRepositoryDispatch()- Parameters:
repositoryDispatch- You can use the GitHub API to trigger a webhook event called repository_dispatch when you want to trigger a workflow for activity that happens outside of GitHub.- Returns:
this
-
schedule
@Stability(Stable) public WorkflowTriggers.Builder schedule(List<? extends CronScheduleOptions> schedule)
Sets the value ofWorkflowTriggers.getSchedule()- Parameters:
schedule- You can schedule a workflow to run at specific UTC times using POSIX cron syntax. Scheduled workflows run on the latest commit on the default or base branch. The shortest interval you can run scheduled workflows is once every 5 minutes.- Returns:
this
-
status
@Stability(Stable) public WorkflowTriggers.Builder status(StatusOptions status)
Sets the value ofWorkflowTriggers.getStatus()- Parameters:
status- Runs your workflow anytime the status of a Git commit changes, which triggers the status event.- Returns:
this
-
watch
@Stability(Stable) public WorkflowTriggers.Builder watch(WatchOptions watch)
Sets the value ofWorkflowTriggers.getWatch()- Parameters:
watch- Runs your workflow anytime the watch event occurs.- Returns:
this
-
workflowDispatch
@Stability(Stable) public WorkflowTriggers.Builder workflowDispatch(WorkflowDispatchOptions workflowDispatch)
Sets the value ofWorkflowTriggers.getWorkflowDispatch()- Parameters:
workflowDispatch- You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When the workflow runs, you can access the input values in the github.event.inputs context.- Returns:
this
-
workflowRun
@Stability(Stable) public WorkflowTriggers.Builder workflowRun(WorkflowRunOptions workflowRun)
Sets the value ofWorkflowTriggers.getWorkflowRun()- Parameters:
workflowRun- This event occurs when a workflow run is requested or completed, and allows you to execute a workflow based on the finished result of another workflow. A workflow run is triggered regardless of the result of the previous workflow.- Returns:
this
-
build
@Stability(Stable) public WorkflowTriggers build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<WorkflowTriggers>- Returns:
- a new instance of
WorkflowTriggers - Throws:
NullPointerException- if any required attribute was not provided
-
-