Class ParentCommitData

java.lang.Object
com.google.gerrit.entities.ParentCommitData

public abstract class ParentCommitData extends Object
Information about the parent of a revision patch-set. The parent can either be a merged commit of the target branch, or a patch-set of another gerrit change.
  • Constructor Details

    • ParentCommitData

      public ParentCommitData()
  • Method Details

    • branchName

      public abstract Optional<String> branchName()
      The name of the target branch into which the current commit should be merged. Set if the change is based on a merged commit in the target branch.

      This field is Optional.empty() if this information is not available for the current commit, or if the parent commit belongs to a patch-set of another Gerrit change.

    • commitId

      public abstract Optional<org.eclipse.jgit.lib.ObjectId> commitId()
      The commit SHA-1 of the parent commit, or Optional.empty() if there is no parent (i.e. current commit is a root commit).
    • isMergedInTargetBranch

      public abstract boolean isMergedInTargetBranch()
      Whether the parent commit is merged in the target branch branchName().
    • changeKey

      public abstract Optional<Change.Key> changeKey()
      Change key of the parent commit. Only set if the parent commit is a patch-set of another gerrit change.
    • changeNumber

      public abstract Optional<Integer> changeNumber()
      Change number of the parent commit. Only set if the parent commit is a patch-set of another gerrit change.
    • patchSetNumber

      public abstract Optional<Integer> patchSetNumber()
      patch-set number of the parent commit. Only set if the parent commit is a patch-set of another gerrit change.
    • changeStatus

      public abstract Optional<Change.Status> changeStatus()
      Change status of the parent commit. Only set if the parent commit is a patch-set of another gerrit change.
    • builder

      public static ParentCommitData.Builder builder()
    • toBuilder

      public abstract ParentCommitData.Builder toBuilder()