Package io.github.cdklabs.projen.github
Class StaleBehavior.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.github.StaleBehavior.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<StaleBehavior>
- Enclosing interface:
- StaleBehavior
@Stability(Experimental) public static final class StaleBehavior.Builder extends Object implements software.amazon.jsii.Builder<StaleBehavior>
A builder forStaleBehavior
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaleBehaviorbuild()Builds the configured instance.StaleBehavior.BuildercloseMessage(String closeMessage)Sets the value ofStaleBehavior.getCloseMessage()StaleBehavior.BuilderdaysBeforeClose(Number daysBeforeClose)Sets the value ofStaleBehavior.getDaysBeforeClose()StaleBehavior.BuilderdaysBeforeStale(Number daysBeforeStale)Sets the value ofStaleBehavior.getDaysBeforeStale()StaleBehavior.Builderenabled(Boolean enabled)Sets the value ofStaleBehavior.getEnabled()StaleBehavior.BuilderexemptLabels(List<String> exemptLabels)Sets the value ofStaleBehavior.getExemptLabels()StaleBehavior.BuilderstaleLabel(String staleLabel)Sets the value ofStaleBehavior.getStaleLabel()StaleBehavior.BuilderstaleMessage(String staleMessage)Sets the value ofStaleBehavior.getStaleMessage()
-
-
-
Method Detail
-
closeMessage
@Stability(Experimental) public StaleBehavior.Builder closeMessage(String closeMessage)
Sets the value ofStaleBehavior.getCloseMessage()- Parameters:
closeMessage- The comment to add to the issue/PR when it's closed.- Returns:
this
-
daysBeforeClose
@Stability(Experimental) public StaleBehavior.Builder daysBeforeClose(Number daysBeforeClose)
Sets the value ofStaleBehavior.getDaysBeforeClose()- Parameters:
daysBeforeClose- Days until the issue/PR is closed after it is marked as "Stale". Set to -1 to disable.- Returns:
this
-
daysBeforeStale
@Stability(Experimental) public StaleBehavior.Builder daysBeforeStale(Number daysBeforeStale)
Sets the value ofStaleBehavior.getDaysBeforeStale()- Parameters:
daysBeforeStale- How many days until the issue or pull request is marked as "Stale". Set to -1 to disable.- Returns:
this
-
enabled
@Stability(Experimental) public StaleBehavior.Builder enabled(Boolean enabled)
Sets the value ofStaleBehavior.getEnabled()- Parameters:
enabled- Determines if this behavior is enabled. Same as settingdaysBeforeStaleanddaysBeforeCloseto-1.- Returns:
this
-
exemptLabels
@Stability(Experimental) public StaleBehavior.Builder exemptLabels(List<String> exemptLabels)
Sets the value ofStaleBehavior.getExemptLabels()- Parameters:
exemptLabels- Label which exempt an issue/PR from becoming stale. Set to[]to disable.- Returns:
this
-
staleLabel
@Stability(Experimental) public StaleBehavior.Builder staleLabel(String staleLabel)
Sets the value ofStaleBehavior.getStaleLabel()- Parameters:
staleLabel- The label to apply to the issue/PR when it becomes stale.- Returns:
this
-
staleMessage
@Stability(Experimental) public StaleBehavior.Builder staleMessage(String staleMessage)
Sets the value ofStaleBehavior.getStaleMessage()- Parameters:
staleMessage- The comment to add to the issue/PR when it becomes stale.- Returns:
this
-
build
@Stability(Experimental) public StaleBehavior build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<StaleBehavior>- Returns:
- a new instance of
StaleBehavior - Throws:
NullPointerException- if any required attribute was not provided
-
-