Search in sources :

Example 26 with SubmitInput

use of com.google.gerrit.extensions.api.changes.SubmitInput in project gerrit by GerritCodeReview.

the class ChangeNotificationsIT method merge.

private void merge(String changeId, TestAccount by, TestAccount onBehalfOf, @Nullable NotifyHandling notify) throws Exception {
    requestScopeOperations.setApiUser(by.id());
    SubmitInput in = new SubmitInput();
    in.notify = notify;
    in.onBehalfOf = onBehalfOf.id().toString();
    gApi.changes().id(changeId).current().submit(in);
}
Also used : SubmitInput(com.google.gerrit.extensions.api.changes.SubmitInput)

Aggregations

SubmitInput (com.google.gerrit.extensions.api.changes.SubmitInput)26 Test (org.junit.Test)18 PushOneCommit (com.google.gerrit.acceptance.PushOneCommit)14 AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)13 ChangeInfo (com.google.gerrit.extensions.common.ChangeInfo)11 ObjectId (org.eclipse.jgit.lib.ObjectId)8 AuthException (com.google.gerrit.extensions.restapi.AuthException)6 Change (com.google.gerrit.reviewdb.client.Change)6 RevCommit (org.eclipse.jgit.revwalk.RevCommit)6 Project (com.google.gerrit.entities.Project)5 Change (com.google.gerrit.entities.Change)4 PatchSet (com.google.gerrit.reviewdb.client.PatchSet)4 TestSubmitInput (com.google.gerrit.server.change.Submit.TestSubmitInput)4 Repository (org.eclipse.jgit.lib.Repository)4 RevWalk (org.eclipse.jgit.revwalk.RevWalk)4 TestSubmitInput (com.google.gerrit.server.change.TestSubmitInput)3 Attempt (com.github.rholder.retry.Attempt)2 RetryListener (com.github.rholder.retry.RetryListener)2 AutoValue (com.google.auto.value.AutoValue)2 Joiner (com.google.common.base.Joiner)2