Search in sources :

Example 1 with PullRequest

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

the class GitServiceClientImpl method pull.

@Override
public void pull(DevMachine devMachine, ProjectConfigDto project, String refSpec, String remote, AsyncRequestCallback<PullResponse> callback) {
    PullRequest pullRequest = dtoFactory.createDto(PullRequest.class).withRemote(remote).withRefSpec(refSpec);
    String url = appContext.getDevMachine().getWsAgentBaseUrl() + PULL + "?projectPath=" + project.getPath();
    asyncRequestFactory.createPostRequest(url, pullRequest).send(callback);
}
Also used : PullRequest(org.eclipse.che.api.git.shared.PullRequest)

Example 2 with PullRequest

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

the class GitServiceClientImpl method pull.

@Override
public Promise<PullResponse> pull(DevMachine devMachine, Path project, String refSpec, String remote) {
    PullRequest pullRequest = dtoFactory.createDto(PullRequest.class).withRemote(remote).withRefSpec(refSpec);
    String url = devMachine.getWsAgentBaseUrl() + PULL + "?projectPath=" + project;
    return asyncRequestFactory.createPostRequest(url, pullRequest).send(dtoUnmarshallerFactory.newUnmarshaller(PullResponse.class));
}
Also used : PullResponse(org.eclipse.che.api.git.shared.PullResponse) PullRequest(org.eclipse.che.api.git.shared.PullRequest)

Aggregations

PullRequest (org.eclipse.che.api.git.shared.PullRequest)2 PullResponse (org.eclipse.che.api.git.shared.PullResponse)1