Package io.github.cdklabs.projen.github
Class GitHubProjectOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.GitHubProjectOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<GitHubProjectOptions>
- Enclosing interface:
- GitHubProjectOptions
@Stability(Experimental) public static final class GitHubProjectOptions.Builder extends Object implements software.amazon.jsii.Builder<GitHubProjectOptions>
A builder forGitHubProjectOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
autoApproveOptions
@Stability(Experimental) public GitHubProjectOptions.Builder autoApproveOptions(AutoApproveOptions autoApproveOptions)
Sets the value ofGitHubProjectOptions.getAutoApproveOptions()- Parameters:
autoApproveOptions- Enable and configure the 'auto approve' workflow.- Returns:
this
-
autoMerge
@Stability(Experimental) public GitHubProjectOptions.Builder autoMerge(Boolean autoMerge)
Sets the value ofGitHubProjectOptions.getAutoMerge()- Parameters:
autoMerge- Enable automatic merging on GitHub. Has no effect ifgithub.mergifyis set to false.- Returns:
this
-
autoMergeOptions
@Stability(Experimental) public GitHubProjectOptions.Builder autoMergeOptions(AutoMergeOptions autoMergeOptions)
Sets the value ofGitHubProjectOptions.getAutoMergeOptions()- Parameters:
autoMergeOptions- Configure options for automatic merging on GitHub. Has no effect ifgithub.mergifyorautoMergeis set to false.- Returns:
this
-
clobber
@Stability(Experimental) public GitHubProjectOptions.Builder clobber(Boolean clobber)
Sets the value ofGitHubProjectOptions.getClobber()- Parameters:
clobber- Add aclobbertask which resets the repo to origin.- Returns:
this
-
devContainer
@Stability(Experimental) public GitHubProjectOptions.Builder devContainer(Boolean devContainer)
Sets the value ofGitHubProjectOptions.getDevContainer()- Parameters:
devContainer- Add a VSCode development environment (used for GitHub Codespaces).- Returns:
this
-
github
@Stability(Experimental) public GitHubProjectOptions.Builder github(Boolean github)
Sets the value ofGitHubProjectOptions.getGithub()- Parameters:
github- Enable GitHub integration. Enabled by default for root projects. Disabled for non-root projects.- Returns:
this
-
githubOptions
@Stability(Experimental) public GitHubProjectOptions.Builder githubOptions(GitHubOptions githubOptions)
Sets the value ofGitHubProjectOptions.getGithubOptions()- Parameters:
githubOptions- Options for GitHub integration.- Returns:
this
-
gitpod
@Stability(Experimental) public GitHubProjectOptions.Builder gitpod(Boolean gitpod)
Sets the value ofGitHubProjectOptions.getGitpod()- Parameters:
gitpod- Add a Gitpod development environment.- Returns:
this
-
mergify
@Stability(Deprecated) @Deprecated public GitHubProjectOptions.Builder mergify(Boolean mergify)
Deprecated.use `githubOptions.mergify` insteadSets the value ofGitHubProjectOptions.getMergify()- Parameters:
mergify- Whether mergify should be enabled on this repository or not.- Returns:
this
-
mergifyOptions
@Stability(Deprecated) @Deprecated public GitHubProjectOptions.Builder mergifyOptions(MergifyOptions mergifyOptions)
Deprecated.use `githubOptions.mergifyOptions` insteadSets the value ofGitHubProjectOptions.getMergifyOptions()- Parameters:
mergifyOptions- Options for mergify.- Returns:
this
-
projectType
@Stability(Deprecated) @Deprecated public GitHubProjectOptions.Builder projectType(ProjectType projectType)
Deprecated.no longer supported at the base project levelSets the value ofGitHubProjectOptions.getProjectType()- Parameters:
projectType- Which type of project this is (library/app).- Returns:
this
-
projenCredentials
@Stability(Experimental) public GitHubProjectOptions.Builder projenCredentials(GithubCredentials projenCredentials)
Sets the value ofGitHubProjectOptions.getProjenCredentials()- Parameters:
projenCredentials- Choose a method of providing GitHub API access for projen workflows.- Returns:
this
-
projenTokenSecret
@Stability(Deprecated) @Deprecated public GitHubProjectOptions.Builder projenTokenSecret(String projenTokenSecret)
Deprecated.use `projenCredentials`Sets the value ofGitHubProjectOptions.getProjenTokenSecret()- Parameters:
projenTokenSecret- The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows. This token needs to have therepo,workflowsandpackagesscope.- Returns:
this
-
readme
@Stability(Experimental) public GitHubProjectOptions.Builder readme(SampleReadmeProps readme)
Sets the value ofGitHubProjectOptions.getReadme()- Parameters:
readme- The README setup.- Returns:
this
-
stale
@Stability(Experimental) public GitHubProjectOptions.Builder stale(Boolean stale)
Sets the value ofGitHubProjectOptions.getStale()- Parameters:
stale- Auto-close of stale issues and pull request. SeestaleOptionsfor options.- Returns:
this
-
staleOptions
@Stability(Experimental) public GitHubProjectOptions.Builder staleOptions(StaleOptions staleOptions)
Sets the value ofGitHubProjectOptions.getStaleOptions()- Parameters:
staleOptions- Auto-close stale issues and pull requests. To disable setstaletofalse.- Returns:
this
-
vscode
@Stability(Experimental) public GitHubProjectOptions.Builder vscode(Boolean vscode)
Sets the value ofGitHubProjectOptions.getVscode()- Parameters:
vscode- Enable VSCode integration. Enabled by default for root projects. Disabled for non-root projects.- Returns:
this
-
name
@Stability(Experimental) public GitHubProjectOptions.Builder name(String name)
Sets the value ofProjectOptions.getName()- Parameters:
name- This is the name of your project. This parameter is required.- Returns:
this
-
commitGenerated
@Stability(Experimental) public GitHubProjectOptions.Builder commitGenerated(Boolean commitGenerated)
Sets the value ofProjectOptions.getCommitGenerated()- Parameters:
commitGenerated- Whether to commit the managed files by default.- Returns:
this
-
gitIgnoreOptions
@Stability(Experimental) public GitHubProjectOptions.Builder gitIgnoreOptions(IgnoreFileOptions gitIgnoreOptions)
Sets the value ofProjectOptions.getGitIgnoreOptions()- Parameters:
gitIgnoreOptions- Configuration options for .gitignore file.- Returns:
this
-
gitOptions
@Stability(Experimental) public GitHubProjectOptions.Builder gitOptions(GitOptions gitOptions)
Sets the value ofProjectOptions.getGitOptions()- Parameters:
gitOptions- Configuration options for git.- Returns:
this
-
logging
@Stability(Experimental) public GitHubProjectOptions.Builder logging(LoggerOptions logging)
Sets the value ofProjectOptions.getLogging()- Parameters:
logging- Configure logging options such as verbosity.- Returns:
this
-
outdir
@Stability(Experimental) public GitHubProjectOptions.Builder outdir(String outdir)
Sets the value ofProjectOptions.getOutdir()- Parameters:
outdir- The root directory of the project. Relative to this directory, all files are synthesized.If this project has a parent, this directory is relative to the parent directory and it cannot be the same as the parent or any of it's other subprojects.
- Returns:
this
-
parent
@Stability(Experimental) public GitHubProjectOptions.Builder parent(Project parent)
Sets the value ofProjectOptions.getParent()- Parameters:
parent- The parent project, if this project is part of a bigger project.- Returns:
this
-
projenCommand
@Stability(Experimental) public GitHubProjectOptions.Builder projenCommand(String projenCommand)
Sets the value ofProjectOptions.getProjenCommand()- Parameters:
projenCommand- The shell command to use in order to run the projen CLI. Can be used to customize in special environments.- Returns:
this
-
projenrcJson
@Stability(Experimental) public GitHubProjectOptions.Builder projenrcJson(Boolean projenrcJson)
Sets the value ofProjectOptions.getProjenrcJson()- Parameters:
projenrcJson- Generate (once) .projenrc.json (in JSON). Set tofalsein order to disable .projenrc.json generation.- Returns:
this
-
projenrcJsonOptions
@Stability(Experimental) public GitHubProjectOptions.Builder projenrcJsonOptions(ProjenrcJsonOptions projenrcJsonOptions)
Sets the value ofProjectOptions.getProjenrcJsonOptions()- Parameters:
projenrcJsonOptions- Options for .projenrc.json.- Returns:
this
-
renovatebot
@Stability(Experimental) public GitHubProjectOptions.Builder renovatebot(Boolean renovatebot)
Sets the value ofProjectOptions.getRenovatebot()- Parameters:
renovatebot- Use renovatebot to handle dependency upgrades.- Returns:
this
-
renovatebotOptions
@Stability(Experimental) public GitHubProjectOptions.Builder renovatebotOptions(RenovatebotOptions renovatebotOptions)
Sets the value ofProjectOptions.getRenovatebotOptions()- Parameters:
renovatebotOptions- Options for renovatebot.- Returns:
this
-
build
@Stability(Experimental) public GitHubProjectOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GitHubProjectOptions>- Returns:
- a new instance of
GitHubProjectOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-