Search in sources :

Example 1 with MergeRequest

use of org.eclipse.che.api.git.shared.MergeRequest in project che by eclipse.

the class GitServiceClientImpl method merge.

@Override
public void merge(DevMachine devMachine, ProjectConfigDto project, String commit, AsyncRequestCallback<MergeResult> callback) {
    MergeRequest mergeRequest = dtoFactory.createDto(MergeRequest.class).withCommit(commit);
    String url = appContext.getDevMachine().getWsAgentBaseUrl() + MERGE + "?projectPath=" + project.getPath();
    asyncRequestFactory.createPostRequest(url, mergeRequest).loader(loader).header(ACCEPT, APPLICATION_JSON).send(callback);
}
Also used : MergeRequest(org.eclipse.che.api.git.shared.MergeRequest)

Example 2 with MergeRequest

use of org.eclipse.che.api.git.shared.MergeRequest in project che by eclipse.

the class GitServiceClientImpl method merge.

@Override
public Promise<MergeResult> merge(DevMachine devMachine, Path project, String commit) {
    MergeRequest mergeRequest = dtoFactory.createDto(MergeRequest.class).withCommit(commit);
    String url = devMachine.getWsAgentBaseUrl() + MERGE + "?projectPath=" + project;
    return asyncRequestFactory.createPostRequest(url, mergeRequest).loader(loader).header(ACCEPT, APPLICATION_JSON).send(dtoUnmarshallerFactory.newUnmarshaller(MergeResult.class));
}
Also used : MergeRequest(org.eclipse.che.api.git.shared.MergeRequest) MergeResult(org.eclipse.che.api.git.shared.MergeResult)

Aggregations

MergeRequest (org.eclipse.che.api.git.shared.MergeRequest)2 MergeResult (org.eclipse.che.api.git.shared.MergeResult)1