Class GitFunctions

java.lang.Object
edu.handong.csee.isel.GitFunctions

public class GitFunctions
extends java.lang.Object
This is a class that contains several methods necessary to collect commits in Github.
  • Constructor Summary

    Constructors 
    Constructor Description
    GitFunctions​(java.lang.String projectName, java.lang.String outPath, java.lang.String gitURL, boolean isAGSZZ)  
  • Method Summary

    Modifier and Type Method Description
    java.util.List<org.eclipse.jgit.revwalk.RevCommit> getAllCommitList()
    After checking whether to clone the repository, if it is not cloned, clone the repository.
    java.io.File getGitDirectory()
    This method returns the location where the file to be cloned will be saved.
    java.lang.String getReferencePath()
    This method returns the path of the reference folder.
    java.io.File GitClone()
    This method is used to clone the repository from Github.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GitFunctions

      public GitFunctions​(java.lang.String projectName, java.lang.String outPath, java.lang.String gitURL, boolean isAGSZZ)
  • Method Details

    • getAllCommitList

      public java.util.List<org.eclipse.jgit.revwalk.RevCommit> getAllCommitList() throws org.eclipse.jgit.api.errors.InvalidRemoteException, org.eclipse.jgit.api.errors.TransportException, org.eclipse.jgit.api.errors.GitAPIException, java.io.IOException
      After checking whether to clone the repository, if it is not cloned, clone the repository. Then collect all commtis in that repository.
      Returns:
      commitList
      Throws:
      org.eclipse.jgit.api.errors.InvalidRemoteException
      org.eclipse.jgit.api.errors.TransportException
      org.eclipse.jgit.api.errors.GitAPIException
      java.io.IOException
    • getReferencePath

      public java.lang.String getReferencePath()
      This method returns the path of the reference folder.
      Returns:
    • getGitDirectory

      public java.io.File getGitDirectory()
      This method returns the location where the file to be cloned will be saved.
      Returns:
      clonedDirectory
    • GitClone

      public java.io.File GitClone() throws org.eclipse.jgit.api.errors.InvalidRemoteException, org.eclipse.jgit.api.errors.TransportException, org.eclipse.jgit.api.errors.GitAPIException
      This method is used to clone the repository from Github.
      Returns:
      Throws:
      org.eclipse.jgit.api.errors.InvalidRemoteException
      org.eclipse.jgit.api.errors.TransportException
      org.eclipse.jgit.api.errors.GitAPIException