Class PatchSet

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

public abstract class PatchSet extends Object
A single revision of a Change.
  • Constructor Details

    • PatchSet

      public PatchSet()
  • Method Details

    • isChangeRef

      public static boolean isChangeRef(String name)
      Is the reference name a change reference?
    • isRef

      @Deprecated @InlineMe(replacement="PatchSet.isChangeRef(name)", imports="com.google.gerrit.entities.PatchSet") public static boolean isRef(String name)
      Deprecated.
      use isChangeRef instead.
      Is the reference name a change reference?
    • joinGroups

      public static String joinGroups(List<String> groups)
    • splitGroups

      public static com.google.common.collect.ImmutableList<String> splitGroups(String joinedGroups)
    • id

      public static PatchSet.Id id(Change.Id changeId, int id)
    • builder

      public static PatchSet.Builder builder()
    • id

      public abstract PatchSet.Id id()
      ID of the patch set.
    • commitId

      public abstract org.eclipse.jgit.lib.ObjectId commitId()
      Commit ID of the patch set, also known as the revision.

      If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include a commitId, then this method will return ObjectId.zeroId().

    • branch

      public abstract Optional<String> branch()
      Name of the target branch where this patch-set should be merged into. If the change is moved, different patch-sets will have different target branches.
    • uploader

      public abstract Account.Id uploader()
      Account that uploaded the patch set.

      If the upload was done on behalf of another user, the impersonated user on whom's behalf the patch set was uploaded.

      If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include an uploader, then this method will return an account ID of 0.

    • realUploader

      public abstract Account.Id realUploader()
      The real account that uploaded the patch set.

      If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data did not include an realUploader, then this method will return the uploader.

    • createdOn

      public abstract Instant createdOn()
      When this patch set was first introduced onto the change.

      If this is a deserialized instance that was originally serialized by an older version of Gerrit, and the old data erroneously did not include a createdOn, then this method will return a timestamp of 0.

    • groups

      public abstract com.google.common.collect.ImmutableList<String> groups()
      Opaque group identifier, usually assigned during creation.

      This field is actually a comma-separated list of values, as in rare cases involving merge commits a patch set may belong to multiple groups.

      Changes on the same branch having patch sets with intersecting groups are considered related, as in the "Related Changes" tab.

    • pushCertificate

      public abstract Optional<String> pushCertificate()
      Certificate sent with a push that created this patch set.
    • description

      public abstract Optional<String> description()
      Optional user-supplied description for this patch set.

      When this field is an empty Optional, the description was never set on the patch set. When this field is present but an empty string, the description was set and later cleared.

    • number

      public int number()
      Patch set number.
    • refName

      public String refName()
      Name of the corresponding patch set ref.