Class AbstractGitTask

java.lang.Object
net.javasauce.ss.util.task.Task
net.javasauce.ss.tasks.git.AbstractGitTask
Direct Known Subclasses:
CheckoutBranchTask, CommitTask, DeleteTagsTask, ExtractTestStatsTask, FastForwardTask, PushAllTask

public abstract class AbstractGitTask extends Task
Created by covers1624 on 6/29/25.
  • Field Details

    • git

      public final TaskInput<org.eclipse.jgit.api.Git> git
  • Constructor Details

    • AbstractGitTask

      protected AbstractGitTask(String name, Executor executor)
  • Method Details

    • checkoutOrCreateBranch

      protected void checkoutOrCreateBranch(String branch) throws org.eclipse.jgit.api.errors.GitAPIException, IOException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
      IOException
    • stageChanges

      protected void stageChanges() throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • commitChanges

      protected void commitChanges(String message) throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • amendChanges

      protected void amendChanges(@Nullable @Nullable String message)
    • createTag

      protected void createTag(String tag) throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • pushAllBranches

      protected void pushAllBranches() throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • pushAllTags

      protected void pushAllTags() throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • wipeCheckedOutFiles

      protected void wipeCheckedOutFiles() throws IOException
      Throws:
      IOException
    • loadBlob

      @Nullable protected <T> T loadBlob(String object, net.covers1624.quack.util.SneakyUtils.ThrowingFunction<org.eclipse.jgit.lib.ObjectStream,? extends T,IOException> func) throws IOException
      Throws:
      IOException
    • listAllTags

      protected Map<String,String> listAllTags()
    • listAllBranches

      protected Map<String,String> listAllBranches() throws org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • fastForwardBranchToCommit

      protected void fastForwardBranchToCommit(String branch, String commit)
    • fastForwardBranch

      protected void fastForwardBranch(String commit) throws IOException, org.eclipse.jgit.api.errors.GitAPIException
      Throws:
      IOException
      org.eclipse.jgit.api.errors.GitAPIException
    • getCommitMessage

      protected String getCommitMessage(String ref)
    • getParentCommit

      @Nullable protected @Nullable String getParentCommit(String ref)