Package io.github.cdklabs.projen.github
Class AutoApprove.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.AutoApprove.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AutoApprove>
- Enclosing class:
- AutoApprove
@Stability(Experimental) public static final class AutoApprove.Builder extends Object implements software.amazon.jsii.Builder<AutoApprove>
(experimental) A fluent builder forAutoApprove.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AutoApprove.BuilderallowedUsernames(List<String> allowedUsernames)(experimental) Only pull requests authored by these Github usernames will be auto-approved.AutoApprovebuild()static AutoApprove.Buildercreate(GitHub github)AutoApprove.Builderlabel(String label)(experimental) Only pull requests with this label will be auto-approved.AutoApprove.BuilderrunsOn(List<String> runsOn)(experimental) Github Runner selection labels.AutoApprove.BuilderrunsOnGroup(GroupRunnerOptions runsOnGroup)(experimental) Github Runner Group selection options.AutoApprove.Buildersecret(String secret)(experimental) A GitHub secret name which contains a GitHub Access Token with write permissions for thepull_requestscope.
-
-
-
Method Detail
-
create
@Stability(Experimental) public static AutoApprove.Builder create(GitHub github)
- Parameters:
github- This parameter is required.- Returns:
- a new instance of
AutoApprove.Builder.
-
allowedUsernames
@Stability(Experimental) public AutoApprove.Builder allowedUsernames(List<String> allowedUsernames)
(experimental) Only pull requests authored by these Github usernames will be auto-approved.Default: ['github-bot']
- Parameters:
allowedUsernames- Only pull requests authored by these Github usernames will be auto-approved. This parameter is required.- Returns:
this
-
label
@Stability(Experimental) public AutoApprove.Builder label(String label)
(experimental) Only pull requests with this label will be auto-approved.Default: 'auto-approve'
- Parameters:
label- Only pull requests with this label will be auto-approved. This parameter is required.- Returns:
this
-
runsOn
@Stability(Experimental) public AutoApprove.Builder runsOn(List<String> runsOn)
(experimental) Github Runner selection labels.Default: ["ubuntu-latest"]
- Parameters:
runsOn- Github Runner selection labels. This parameter is required.- Returns:
this
-
runsOnGroup
@Stability(Experimental) public AutoApprove.Builder runsOnGroup(GroupRunnerOptions runsOnGroup)
(experimental) Github Runner Group selection options.- Parameters:
runsOnGroup- Github Runner Group selection options. This parameter is required.- Returns:
this
-
secret
@Stability(Experimental) public AutoApprove.Builder secret(String secret)
(experimental) 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.
Default: "GITHUB_TOKEN"
- Parameters:
secret- A GitHub secret name which contains a GitHub Access Token with write permissions for thepull_requestscope. This parameter is required.- Returns:
this
-
build
@Stability(Experimental) public AutoApprove build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AutoApprove>- Returns:
- a newly built instance of
AutoApprove.
-
-