Package io.github.cdklabs.projen.github
Class CheckoutWithPatchOptions.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.CheckoutWithPatchOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CheckoutWithPatchOptions>
- Enclosing interface:
- CheckoutWithPatchOptions
@Stability(Experimental) public static final class CheckoutWithPatchOptions.Builder extends Object implements software.amazon.jsii.Builder<CheckoutWithPatchOptions>
A builder forCheckoutWithPatchOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckoutWithPatchOptionsbuild()Builds the configured instance.CheckoutWithPatchOptions.BuilderfetchDepth(Number fetchDepth)Sets the value ofCheckoutWith.getFetchDepth()CheckoutWithPatchOptions.Builderlfs(Boolean lfs)Sets the value ofCheckoutWith.getLfs()CheckoutWithPatchOptions.BuilderpatchFile(String patchFile)Sets the value ofCheckoutWithPatchOptions.getPatchFile()CheckoutWithPatchOptions.Builderref(String ref)Sets the value ofCheckoutWith.getRef()CheckoutWithPatchOptions.Builderrepository(String repository)Sets the value ofCheckoutWith.getRepository()CheckoutWithPatchOptions.Buildertoken(String token)Sets the value ofCheckoutWith.getToken()
-
-
-
Method Detail
-
patchFile
@Stability(Experimental) public CheckoutWithPatchOptions.Builder patchFile(String patchFile)
Sets the value ofCheckoutWithPatchOptions.getPatchFile()- Parameters:
patchFile- The name of the artifact the patch is stored as.- Returns:
this
-
fetchDepth
@Stability(Experimental) public CheckoutWithPatchOptions.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 CheckoutWithPatchOptions.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 CheckoutWithPatchOptions.Builder ref(String ref)
Sets the value ofCheckoutWith.getRef()- Parameters:
ref- Branch or tag name.- Returns:
this
-
repository
@Stability(Experimental) public CheckoutWithPatchOptions.Builder repository(String repository)
Sets the value ofCheckoutWith.getRepository()- Parameters:
repository- The repository (owner/repo) to use.- Returns:
this
-
token
@Stability(Experimental) public CheckoutWithPatchOptions.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 CheckoutWithPatchOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CheckoutWithPatchOptions>- Returns:
- a new instance of
CheckoutWithPatchOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-