Merge "SubmitInput: Remove deprecated waitForMerge field"
This commit is contained in:
@@ -1050,8 +1050,7 @@ the error message is contained in the response body.
|
||||
Submits a change.
|
||||
|
||||
The request body only needs to include a link:#submit-input[
|
||||
SubmitInput] entity if the request should wait for the merge to
|
||||
complete.
|
||||
SubmitInput] entity if submitting on behalf of another user.
|
||||
|
||||
.Request
|
||||
----
|
||||
@@ -1059,7 +1058,7 @@ complete.
|
||||
Content-Type: application/json; charset=UTF-8
|
||||
|
||||
{
|
||||
"wait_for_merge": true
|
||||
"on_behalf_of": 1001439
|
||||
}
|
||||
----
|
||||
|
||||
@@ -4780,10 +4779,6 @@ after submitting.
|
||||
|Field Name ||Description
|
||||
|`status` ||
|
||||
The status of the change after submitting is `MERGED`.
|
||||
+
|
||||
As `wait_for_merge` in the link:#submit-input[SubmitInput] is deprecated and
|
||||
the request always waits for the merge to be completed, you can expect
|
||||
`MERGED` to be returned here.
|
||||
|`on_behalf_of`|optional|
|
||||
The link:rest-api-accounts.html#account-id[\{account-id\}] of the user on
|
||||
whose behalf the action should be done. To use this option the caller must
|
||||
@@ -4808,8 +4803,6 @@ format link:rest-api-accounts.html#account-id[accepted by the accounts REST
|
||||
API]. Using this option requires
|
||||
link:access-control.html#category_submit_on_behalf_of[Submit (On Behalf Of)]
|
||||
permission on the branch.
|
||||
|`wait_for_merge`|Deprecated, always `true`|
|
||||
Whether the request should wait for the merge to complete.
|
||||
|===========================
|
||||
|
||||
[[submit-record]]
|
||||
|
@@ -15,7 +15,5 @@
|
||||
package com.google.gerrit.extensions.api.changes;
|
||||
|
||||
public class SubmitInput {
|
||||
@Deprecated
|
||||
public boolean waitForMerge;
|
||||
public String onBehalfOf;
|
||||
}
|
||||
|
@@ -192,8 +192,7 @@ public class ChangeApi {
|
||||
|
||||
/** Submit a specific revision of a change. */
|
||||
public static void submit(int id, String commit, AsyncCallback<SubmitInfo> cb) {
|
||||
SubmitInput in = SubmitInput.create();
|
||||
in.waitForMerge(true);
|
||||
JavaScriptObject in = JavaScriptObject.createObject();
|
||||
call(id, commit, "submit").post(in, cb);
|
||||
}
|
||||
|
||||
@@ -287,17 +286,6 @@ public class ChangeApi {
|
||||
}
|
||||
}
|
||||
|
||||
private static class SubmitInput extends JavaScriptObject {
|
||||
final native void waitForMerge(boolean b) /*-{ this.wait_for_merge=b; }-*/;
|
||||
|
||||
static SubmitInput create() {
|
||||
return (SubmitInput) createObject();
|
||||
}
|
||||
|
||||
protected SubmitInput() {
|
||||
}
|
||||
}
|
||||
|
||||
private static RestApi call(int id, String action) {
|
||||
return change(id).view(action);
|
||||
}
|
||||
|
@@ -118,10 +118,8 @@ public class Submit implements RestModifyView<RevisionResource, SubmitInput>,
|
||||
public static class TestSubmitInput extends SubmitInput {
|
||||
public final boolean failAfterRefUpdates;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public TestSubmitInput(SubmitInput base, boolean failAfterRefUpdates) {
|
||||
this.onBehalfOf = base.onBehalfOf;
|
||||
this.waitForMerge = base.waitForMerge;
|
||||
this.failAfterRefUpdates = failAfterRefUpdates;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user