Class 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 for AutoApprove.
    • Method Detail

      • 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 the pull_request scope.

        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 the pull_request scope. This parameter is required.
        Returns:
        this
      • build

        @Stability(Experimental)
        public AutoApprove build()
        Specified by:
        build in interface software.amazon.jsii.Builder<AutoApprove>
        Returns:
        a newly built instance of AutoApprove.