Add resolve and reply support

This commit is contained in:
2026-07-28 11:27:20 +02:00
parent fdaee6a69e
commit 0e880fa9b0
8 changed files with 664 additions and 44 deletions

View File

@@ -118,6 +118,26 @@ func (c *CachedGitHubService) LivePullRequest(
return details, nil
}
func (c *CachedGitHubService) SetThreadResolved(
ctx context.Context, threadID string, resolved bool,
) (ReviewThread, error) {
writer, ok := c.remote.(GitHubWriteService)
if !ok {
return ReviewThread{}, errors.New("GitHub service does not support write actions")
}
return writer.SetThreadResolved(ctx, threadID, resolved)
}
func (c *CachedGitHubService) ReplyToThread(
ctx context.Context, threadID, body string,
) (ReviewComment, error) {
writer, ok := c.remote.(GitHubWriteService)
if !ok {
return ReviewComment{}, errors.New("GitHub service does not support write actions")
}
return writer.ReplyToThread(ctx, threadID, body)
}
func (c *CachedGitHubService) pullRequestsKey(owner, repo string, limit int, showAll bool) string {
return fmt.Sprintf("prs:%s/%s:%d:%t", owner, repo, limit, showAll)
}