Add new notify type that allows watching of new patch sets
Users can now watch the creation of new patch sets. They get notified if a new patch set is uploaded, but also if a rebase is done from the WebUI or the commit message is edited in the WebUI. Change-Id: Ieabc4c00d2b185e5b452ac43706cb0fdd9d87f77 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
committed by
Shawn Pearce
parent
81f2be8cef
commit
1121475d1c
@@ -70,6 +70,8 @@ public class CreateChangeSender extends NewChangeSender {
|
||||
// who have a lower interest in the change.
|
||||
log.warn("Cannot notify watchers for new change", err);
|
||||
}
|
||||
|
||||
includeWatchers(NotifyType.NEW_PATCHSETS);
|
||||
}
|
||||
|
||||
private boolean isOwnerOfProjectOrBranch(Account.Id user) {
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.google.gerrit.server.mail;
|
||||
import com.google.gerrit.common.errors.EmailException;
|
||||
import com.google.gerrit.reviewdb.client.Account;
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gerrit.reviewdb.client.AccountProjectWatch.NotifyType;
|
||||
import com.google.gerrit.server.config.AnonymousCowardName;
|
||||
import com.google.gerrit.server.ssh.SshInfo;
|
||||
import com.google.inject.Inject;
|
||||
@@ -69,6 +70,7 @@ public class ReplacePatchSetSender extends ReplyToChangeSender {
|
||||
add(RecipientType.CC, extraCC);
|
||||
rcptToAuthors(RecipientType.CC);
|
||||
bccStarredBy();
|
||||
includeWatchers(NotifyType.NEW_PATCHSETS);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2013 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.gerrit.server.schema;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
|
||||
public class Schema_75 extends SchemaVersion {
|
||||
@Inject
|
||||
Schema_75(Provider<Schema_74> prior) {
|
||||
super(prior);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user