Class GHCommit.File

java.lang.Object
org.kohsuke.github.GHCommit.File
Enclosing class:
GHCommit

public static class GHCommit.File extends Object
A file that was modified.
  • Constructor Details

    • File

      public File()
      Create default File instance
  • Method Details

    • getLinesChanged

      public int getLinesChanged()
      Gets lines changed.
      Returns:
      Number of lines added + removed.
    • getLinesAdded

      public int getLinesAdded()
      Gets lines added.
      Returns:
      Number of lines added.
    • getLinesDeleted

      public int getLinesDeleted()
      Gets lines deleted.
      Returns:
      Number of lines removed.
    • getStatus

      public String getStatus()
      Gets status.
      Returns:
      "modified", "added", or "removed"
    • getFileName

      public String getFileName()
      Gets file name.
      Returns:
      Full path in the repository.
    • getPreviousFilename

      public String getPreviousFilename()
      Gets previous filename.
      Returns:
      Previous path, in case file has moved.
    • getPatch

      public String getPatch()
      Gets patch.
      Returns:
      The actual change.
    • getRawUrl

      public URL getRawUrl()
      Gets raw url.
      Returns:
      URL like 'https://raw.github.com/jenkinsci/jenkins/4eb17c197dfdcf8ef7ff87eb160f24f6a20b7f0e/core/pom.xml' that resolves to the actual content of the file.
    • getBlobUrl

      public URL getBlobUrl()
      Gets blob url.
      Returns:
      URL like 'https://github.com/jenkinsci/jenkins/blob/1182e2ebb1734d0653142bd422ad33c21437f7cf/core/pom.xml' that resolves to the HTML page that describes this file.
    • getSha

      public String getSha()
      Gets sha.
      Returns:
      [0 -9a-f]{40} SHA1 checksum.