Make dashboard updateable

This commit is contained in:
2026-07-28 12:44:31 +02:00
parent 72e1eb1fda
commit bb8e91039f
21 changed files with 3482 additions and 43 deletions

View File

@@ -138,6 +138,28 @@ func (c *CachedGitHubService) ReplyToThread(
return writer.ReplyToThread(ctx, threadID, body)
}
func (c *CachedGitHubService) UpdatePullRequest(
ctx context.Context,
pullRequestID string,
update PullRequestMetadata,
) (PullRequestMetadata, error) {
writer, ok := c.remote.(GitHubPullRequestWriteService)
if !ok {
return PullRequestMetadata{}, errors.New("GitHub service does not support pull request updates")
}
return writer.UpdatePullRequest(ctx, pullRequestID, update)
}
func (c *CachedGitHubService) ListBranches(
ctx context.Context, owner, repo string,
) ([]RepositoryBranch, error) {
service, ok := c.remote.(GitHubBranchService)
if !ok {
return nil, errors.New("GitHub service does not support listing branches")
}
return service.ListBranches(ctx, owner, repo)
}
func (c *CachedGitHubService) pullRequestsKey(owner, repo string, limit int, showAll bool) string {
return fmt.Sprintf("prs:%s/%s:%d:%t", owner, repo, limit, showAll)
}