Bring draft status to PatchSetAttribute
Thereby, stream event consumers can differentiate between events that are tied to a draft patch set and those that are not. Change-Id: Idbdcfc979f2383de0708560bf2e148fcc51d612f
This commit is contained in:
@@ -115,6 +115,8 @@ author:: Author of this patchset in <<account,account attribute>>.
|
||||
createdOn:: Time in seconds since the UNIX epoch when this patchset
|
||||
was created.
|
||||
|
||||
isDraft:: Whether or not the patch set is a draft patch set.
|
||||
|
||||
approvals:: The <<approval,approval attribute>> granted.
|
||||
|
||||
comments:: All comments for this patchset in <<patchsetcomment,patchsetComment attributes>>.
|
||||
|
@@ -24,6 +24,7 @@ public class PatchSetAttribute {
|
||||
public AccountAttribute uploader;
|
||||
public Long createdOn;
|
||||
public AccountAttribute author;
|
||||
public boolean isDraft;
|
||||
|
||||
public List<ApprovalAttribute> approvals;
|
||||
public List<PatchSetCommentAttribute> comments;
|
||||
|
@@ -361,6 +361,7 @@ public class EventFactory {
|
||||
p.ref = patchSet.getRefName();
|
||||
p.uploader = asAccountAttribute(patchSet.getUploader());
|
||||
p.createdOn = patchSet.getCreatedOn().getTime() / 1000L;
|
||||
p.isDraft = patchSet.isDraft();
|
||||
final PatchSet.Id pId = patchSet.getId();
|
||||
try {
|
||||
final ReviewDb db = schema.open();
|
||||
|
Reference in New Issue
Block a user