Package io.github.cdklabs.projen.github
Class CheckoutWith.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.CheckoutWith.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CheckoutWith>
- Enclosing interface:
- CheckoutWith
@Stability(Experimental) public static final class CheckoutWith.Builder extends Object implements software.amazon.jsii.Builder<CheckoutWith>
A builder forCheckoutWith
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckoutWithbuild()Builds the configured instance.CheckoutWith.BuilderfetchDepth(Number fetchDepth)Sets the value ofCheckoutWith.getFetchDepth()CheckoutWith.Builderlfs(Boolean lfs)Sets the value ofCheckoutWith.getLfs()CheckoutWith.Builderref(String ref)Sets the value ofCheckoutWith.getRef()CheckoutWith.Builderrepository(String repository)Sets the value ofCheckoutWith.getRepository()CheckoutWith.Buildertoken(String token)Sets the value ofCheckoutWith.getToken()
-
-
-
Method Detail
-
fetchDepth
@Stability(Experimental) public CheckoutWith.Builder fetchDepth(Number fetchDepth)
Sets the value ofCheckoutWith.getFetchDepth()- Parameters:
fetchDepth- Number of commits to fetch. 0 indicates all history for all branches and tags.- Returns:
this
-
lfs
@Stability(Experimental) public CheckoutWith.Builder lfs(Boolean lfs)
Sets the value ofCheckoutWith.getLfs()- Parameters:
lfs- Whether LFS is enabled for the GitHub repository.- Returns:
this
-
ref
@Stability(Experimental) public CheckoutWith.Builder ref(String ref)
Sets the value ofCheckoutWith.getRef()- Parameters:
ref- Branch or tag name.- Returns:
this
-
repository
@Stability(Experimental) public CheckoutWith.Builder repository(String repository)
Sets the value ofCheckoutWith.getRepository()- Parameters:
repository- The repository (owner/repo) to use.- Returns:
this
-
token
@Stability(Experimental) public CheckoutWith.Builder token(String token)
Sets the value ofCheckoutWith.getToken()- Parameters:
token- A GitHub token to use when checking out the repository. If the intent is to push changes back to the branch, then you must use a PAT withrepo(and possiblyworkflows) permissions.- Returns:
this
-
build
@Stability(Experimental) public CheckoutWith build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CheckoutWith>- Returns:
- a new instance of
CheckoutWith - Throws:
NullPointerException- if any required attribute was not provided
-
-