Class ManageLabelGitHubAction
java.lang.Object
me.julb.applications.github.actions.ManageLabelGitHubAction
- All Implemented Interfaces:
 me.julb.sdk.github.actions.spi.GitHubActionProvider
public class ManageLabelGitHubAction
extends Object
implements me.julb.sdk.github.actions.spi.GitHubActionProvider
The action to manage labels. 
- Author:
 - Julb.
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescription(package private) voidConnects to GitHub API.(package private) voidcreateLabels(@NonNull Collection<LabelDTO> labelsToCreate) Create the given labels in the repository.(package private) voiddeleteLabels(@NonNull Collection<org.kohsuke.github.GHLabel> labelsToDelete) Deletes the given labels from the repository.voidexecute()Gets allGHLabelpresent in the repository.(package private) String[]Gets the "from" input.getInputLabels(@NonNull String[] labelSources) Gets allGHLabelpresent in the repository.(package private) booleanGets the "skip_delete" input.(package private) InputStreamgetInputStream(@NonNull String labelSource) Gets the input stream according to the given source.(package private) voidupdateLabels(@NonNull Map<LabelDTO, org.kohsuke.github.GHLabel> labelsToUpdate) Updates the given labels in the repository. 
- 
Constructor Details
- 
ManageLabelGitHubAction
public ManageLabelGitHubAction() 
 - 
 - 
Method Details
- 
execute
public void execute()- Specified by:
 executein interfaceme.julb.sdk.github.actions.spi.GitHubActionProvider
 - 
getInputFrom
String[] getInputFrom()Gets the "from" input.- Returns:
 - the "from" input.
 
 - 
getInputSkipDelete
boolean getInputSkipDelete()Gets the "skip_delete" input.- Returns:
 - the "skip_delete" input.
 
 - 
connectApi
Connects to GitHub API.- Throws:
 IOException- if an error occurs.
 - 
getInputLabels
Gets allGHLabelpresent in the repository.- Returns:
 - all 
GHLabelpresent in the repository. - Throws:
 IOException- if an error occurs.
 - 
getInputStream
Gets the input stream according to the given source.- Parameters:
 labelSource- the label source.- Returns:
 - the stream to consume that source.
 - Throws:
 IOException- if an error occurs.
 - 
getGHLabels
Gets allGHLabelpresent in the repository.- Returns:
 - all 
GHLabelpresent in the repository. - Throws:
 IOException- if an error occurs.
 - 
createLabels
Create the given labels in the repository.- Parameters:
 labelsToCreate- the labels to create.- Throws:
 IOException- if an error occurs.
 - 
updateLabels
void updateLabels(@NonNull @NonNull Map<LabelDTO, org.kohsuke.github.GHLabel> labelsToUpdate) throws IOExceptionUpdates the given labels in the repository.- Parameters:
 labelsToUpdate- the labels to update.- Throws:
 IOException- if an error occurs.
 - 
deleteLabels
void deleteLabels(@NonNull @NonNull Collection<org.kohsuke.github.GHLabel> labelsToDelete) throws IOException Deletes the given labels from the repository.- Parameters:
 labelsToDelete- the labels to create.- Throws:
 IOException- if an error occurs.
 
 -