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
|
createdOn:: Time in seconds since the UNIX epoch when this patchset
|
||||||
was created.
|
was created.
|
||||||
|
|
||||||
|
isDraft:: Whether or not the patch set is a draft patch set.
|
||||||
|
|
||||||
approvals:: The <<approval,approval attribute>> granted.
|
approvals:: The <<approval,approval attribute>> granted.
|
||||||
|
|
||||||
comments:: All comments for this patchset in <<patchsetcomment,patchsetComment attributes>>.
|
comments:: All comments for this patchset in <<patchsetcomment,patchsetComment attributes>>.
|
||||||
|
@@ -24,6 +24,7 @@ public class PatchSetAttribute {
|
|||||||
public AccountAttribute uploader;
|
public AccountAttribute uploader;
|
||||||
public Long createdOn;
|
public Long createdOn;
|
||||||
public AccountAttribute author;
|
public AccountAttribute author;
|
||||||
|
public boolean isDraft;
|
||||||
|
|
||||||
public List<ApprovalAttribute> approvals;
|
public List<ApprovalAttribute> approvals;
|
||||||
public List<PatchSetCommentAttribute> comments;
|
public List<PatchSetCommentAttribute> comments;
|
||||||
|
@@ -361,6 +361,7 @@ public class EventFactory {
|
|||||||
p.ref = patchSet.getRefName();
|
p.ref = patchSet.getRefName();
|
||||||
p.uploader = asAccountAttribute(patchSet.getUploader());
|
p.uploader = asAccountAttribute(patchSet.getUploader());
|
||||||
p.createdOn = patchSet.getCreatedOn().getTime() / 1000L;
|
p.createdOn = patchSet.getCreatedOn().getTime() / 1000L;
|
||||||
|
p.isDraft = patchSet.isDraft();
|
||||||
final PatchSet.Id pId = patchSet.getId();
|
final PatchSet.Id pId = patchSet.getId();
|
||||||
try {
|
try {
|
||||||
final ReviewDb db = schema.open();
|
final ReviewDb db = schema.open();
|
||||||
|
Reference in New Issue
Block a user