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