Support notify option for delete reviewer REST endpoint

Some automated tools may want to suppress email notifications when
removing reviewers.

Change-Id: I26f66272d4f871aae9d36f3524faea9ffa86ea35
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-08-29 12:01:00 +02:00
parent e1cc01fcac
commit 407fca3cc2
9 changed files with 147 additions and 46 deletions

View File

@@ -0,0 +1,21 @@
// Copyright (C) 2016 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.extensions.api.changes;
/** Input passed to {@code DELETE /changes/[id]/reviewers/[id]}. */
public class DeleteReviewerInput {
/** Who to send email notifications to after the reviewer is deleted. */
public NotifyHandling notify = NotifyHandling.ALL;
}

View File

@@ -25,6 +25,7 @@ public interface ReviewerApi {
void deleteVote(String label) throws RestApiException;
void deleteVote(DeleteVoteInput input) throws RestApiException;
void remove() throws RestApiException;
void remove(DeleteReviewerInput input) throws RestApiException;
/**
* A default implementation which allows source compatibility
@@ -50,5 +51,10 @@ public interface ReviewerApi {
public void remove() throws RestApiException {
throw new NotImplementedException();
}
@Override
public void remove(DeleteReviewerInput input) throws RestApiException {
throw new NotImplementedException();
}
}
}