Files
java-ai-agents/pr-reviewer/src/main/java/com/ankurm/prreviewer/GitHost.java
T

27 lines
759 B
Java

package com.ankurm.prreviewer;
import java.util.List;
/** Everything the reviewer needs from a Git server. */
public interface GitHost {
record Review(long id, String state, String author) {}
record Comment(String author, String body) {}
record InlineComment(String path, int line, String body) {}
/** Head commit of the pull request as the server sees it now. */
String headSha(String repo, int pull);
String diff(String repo, int pull);
List<Review> reviews(String repo, int pull);
List<Comment> comments(String repo, int pull, long reviewId);
void deleteReview(String repo, int pull, long reviewId);
long createReview(String repo, int pull, String commitSha, String body, List<InlineComment> comments);
}