Do not include project watchers on new draft changes
If a draft change is created by pushing to refs/drafts/master only
the reviewers explicitly named on the command line (which may be
empty) should be notified of the change. Users watching the project
should not be notified, as the change has not yet been published.
Change-Id: I703ea779106c025c8002e79d39c060208b2e119d
(cherry picked from commit 8690a108f6)
This commit is contained in:
committed by
David Pursehouse
parent
f208205635
commit
202f02835a
@@ -45,6 +45,7 @@ public class CreateChangeSender extends NewChangeSender {
|
||||
protected void init() throws EmailException {
|
||||
super.init();
|
||||
|
||||
if (change.getStatus() == Change.Status.NEW) {
|
||||
try {
|
||||
// Try to mark interested owners with TO and CC or BCC line.
|
||||
Watchers matching = getWatchers(NotifyType.NEW_CHANGES);
|
||||
@@ -70,6 +71,7 @@ public class CreateChangeSender extends NewChangeSender {
|
||||
|
||||
includeWatchers(NotifyType.NEW_PATCHSETS);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isOwnerOfProjectOrBranch(Account.Id user) {
|
||||
return projectState != null
|
||||
|
||||
Reference in New Issue
Block a user