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 Details

    • ManageLabelGitHubAction

      public ManageLabelGitHubAction()
  • Method Details

    • execute

      public void execute()
      Specified by:
      execute in interface me.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

      void connectApi() throws IOException
      Connects to GitHub API.
      Throws:
      IOException - if an error occurs.
    • getInputLabels

      Map<String,LabelDTO> getInputLabels(@NonNull @NonNull String[] labelSources) throws IOException
      Gets all GHLabel present in the repository.
      Returns:
      all GHLabel present in the repository.
      Throws:
      IOException - if an error occurs.
    • getInputStream

      InputStream getInputStream(@NonNull @NonNull String labelSource) throws IOException
      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

      Map<String,org.kohsuke.github.GHLabel> getGHLabels() throws IOException
      Gets all GHLabel present in the repository.
      Returns:
      all GHLabel present in the repository.
      Throws:
      IOException - if an error occurs.
    • createLabels

      void createLabels(@NonNull @NonNull Collection<LabelDTO> labelsToCreate) throws IOException
      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 IOException
      Updates 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.