Package io.github.cdklabs.projen.github
Class AutoApproveOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.AutoApproveOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AutoApproveOptions>
- Enclosing interface:
- AutoApproveOptions
@Stability(Experimental) public static final class AutoApproveOptions.Builder extends Object implements software.amazon.jsii.Builder<AutoApproveOptions>
A builder forAutoApproveOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoApproveOptions.BuilderallowedUsernames(List<String> allowedUsernames)Sets the value ofAutoApproveOptions.getAllowedUsernames()AutoApproveOptionsbuild()Builds the configured instance.AutoApproveOptions.Builderlabel(String label)Sets the value ofAutoApproveOptions.getLabel()AutoApproveOptions.BuilderrunsOn(List<String> runsOn)Sets the value ofAutoApproveOptions.getRunsOn()AutoApproveOptions.BuilderrunsOnGroup(GroupRunnerOptions runsOnGroup)Sets the value ofAutoApproveOptions.getRunsOnGroup()AutoApproveOptions.Buildersecret(String secret)Sets the value ofAutoApproveOptions.getSecret()
-
-
-
Method Detail
-
allowedUsernames
@Stability(Experimental) public AutoApproveOptions.Builder allowedUsernames(List<String> allowedUsernames)
Sets the value ofAutoApproveOptions.getAllowedUsernames()- Parameters:
allowedUsernames- Only pull requests authored by these Github usernames will be auto-approved.- Returns:
this
-
label
@Stability(Experimental) public AutoApproveOptions.Builder label(String label)
Sets the value ofAutoApproveOptions.getLabel()- Parameters:
label- Only pull requests with this label will be auto-approved.- Returns:
this
-
runsOn
@Stability(Experimental) public AutoApproveOptions.Builder runsOn(List<String> runsOn)
Sets the value ofAutoApproveOptions.getRunsOn()- Parameters:
runsOn- Github Runner selection labels.- Returns:
this
-
runsOnGroup
@Stability(Experimental) public AutoApproveOptions.Builder runsOnGroup(GroupRunnerOptions runsOnGroup)
Sets the value ofAutoApproveOptions.getRunsOnGroup()- Parameters:
runsOnGroup- Github Runner Group selection options.- Returns:
this
-
secret
@Stability(Experimental) public AutoApproveOptions.Builder secret(String secret)
Sets the value ofAutoApproveOptions.getSecret()- Parameters:
secret- A GitHub secret name which contains a GitHub Access Token with write permissions for thepull_requestscope. This token is used to approve pull requests. Github forbids an identity to approve its own pull request. If your project produces automated pull requests using the Github default token - {@link https://docs.github.com/en/actions/reference/authentication-in-a-workflow `GITHUB_TOKEN` } * that you would like auto approved, such as when using the `depsUpgrade` property in `NodeProjectOptions`, then you must use a different token here.- Returns:
this
-
build
@Stability(Experimental) public AutoApproveOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AutoApproveOptions>- Returns:
- a new instance of
AutoApproveOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-