Add WIP awareness to PutMessage notifications
This change adds notification integration tests for this new API endpoint. For convenience, PutMessage.Input is moved to common extensions and renamed MessageInput, so it can be incorporated into the ChangeApi interface. Bug: Issue 6615 Change-Id: If419d713e4586038f04cc079245fed825acfb647
This commit is contained in:
@@ -19,6 +19,7 @@ import com.google.gerrit.extensions.client.ListChangesOption;
|
||||
import com.google.gerrit.extensions.common.AccountInfo;
|
||||
import com.google.gerrit.extensions.common.ChangeInfo;
|
||||
import com.google.gerrit.extensions.common.CommentInfo;
|
||||
import com.google.gerrit.extensions.common.CommitMessageInput;
|
||||
import com.google.gerrit.extensions.common.EditInfo;
|
||||
import com.google.gerrit.extensions.common.MergePatchSetInput;
|
||||
import com.google.gerrit.extensions.common.RobotCommentInfo;
|
||||
@@ -193,6 +194,9 @@ public interface ChangeApi {
|
||||
/** Create a new patch set with a new commit message. */
|
||||
void setMessage(String message) throws RestApiException;
|
||||
|
||||
/** Create a new patch set with a new commit message. */
|
||||
void setMessage(CommitMessageInput in) throws RestApiException;
|
||||
|
||||
/** Set hashtags on a change */
|
||||
void setHashtags(HashtagsInput input) throws RestApiException;
|
||||
|
||||
@@ -438,6 +442,11 @@ public interface ChangeApi {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMessage(CommitMessageInput in) throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EditInfo getEdit() throws RestApiException {
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2017 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.common;
|
||||
|
||||
import com.google.gerrit.common.Nullable;
|
||||
import com.google.gerrit.extensions.api.changes.NotifyHandling;
|
||||
import com.google.gerrit.extensions.api.changes.NotifyInfo;
|
||||
import com.google.gerrit.extensions.api.changes.RecipientType;
|
||||
import com.google.gerrit.extensions.restapi.DefaultInput;
|
||||
import java.util.Map;
|
||||
|
||||
public class CommitMessageInput {
|
||||
@DefaultInput public String message;
|
||||
|
||||
@Nullable public NotifyHandling notify;
|
||||
|
||||
public Map<RecipientType, NotifyInfo> notifyDetails;
|
||||
}
|
||||
Reference in New Issue
Block a user