Search in sources :

Example 11 with Diff

use of com.google.startupos.tools.reviewer.local_server.service.Protos.Diff in project startup-os by google.

the class CodeReviewService method getDiff.

@Override
public void getDiff(DiffRequest request, StreamObserver<Protos.Diff> responseObserver) {
    checkAuth();
    FirestoreProtoClient client = new FirestoreProtoClient(authService.getProjectId(), authService.getToken());
    Diff diff = (Diff) client.getProtoDocument(ReviewerConstants.DIFF_COLLECTION, String.valueOf(request.getDiffId()), Diff.newBuilder());
    responseObserver.onNext(diff);
    responseObserver.onCompleted();
}
Also used : Diff(com.google.startupos.tools.reviewer.local_server.service.Protos.Diff) TextDiff(com.google.startupos.common.Protos.TextDiff) FirestoreProtoClient(com.google.startupos.common.firestore.FirestoreProtoClient)

Aggregations

Diff (com.google.startupos.tools.reviewer.local_server.service.Protos.Diff)11 GitRepo (com.google.startupos.common.repo.GitRepo)3 PullRequest (com.google.startupos.tools.reviewer.job.sync.GithubPullRequestProtos.PullRequest)3 TextDiff (com.google.startupos.common.Protos.TextDiff)2 FirestoreProtoClient (com.google.startupos.common.firestore.FirestoreProtoClient)2 CreateDiffRequest (com.google.startupos.tools.reviewer.local_server.service.Protos.CreateDiffRequest)2 Reviewer (com.google.startupos.tools.reviewer.local_server.service.Protos.Reviewer)2 IOException (java.io.IOException)2 Test (org.junit.Test)2 ImmutableList (com.google.common.collect.ImmutableList)1 FileUtils (com.google.startupos.common.FileUtils)1 ProtoChange (com.google.startupos.common.firestore.ProtoChange)1 ProtoQuerySnapshot (com.google.startupos.common.firestore.ProtoQuerySnapshot)1 Flag (com.google.startupos.common.flags.Flag)1 FlagDesc (com.google.startupos.common.flags.FlagDesc)1 Flags (com.google.startupos.common.flags.Flags)1 GitRepoFactory (com.google.startupos.common.repo.GitRepoFactory)1 IssueComment (com.google.startupos.tools.reviewer.job.sync.GithubPullRequestProtos.IssueComment)1 ReviewComment (com.google.startupos.tools.reviewer.job.sync.GithubPullRequestProtos.ReviewComment)1 CodeReviewServiceGrpc (com.google.startupos.tools.reviewer.local_server.service.CodeReviewServiceGrpc)1