feat: adapt pullfrog for gitea + ollama

This commit is contained in:
2026-05-31 01:01:00 -05:00
parent 36ac64a5b6
commit 2aca1a3aa3
183 changed files with 1419 additions and 28292 deletions
+7 -8
View File
@@ -10,25 +10,24 @@ export function GetIssueCommentsTool(ctx: ToolContext) {
return tool({
name: "get_issue_comments",
description:
"Get all comments for a GitHub issue. Returns all comments including the issue body and all subsequent discussion comments. " +
"Get all comments for a Gitea issue or PR. " +
"Example: `get_issue_comments({ issue_number: 1234 })`.",
parameters: GetIssueComments,
execute: execute(async ({ issue_number }) => {
// set issue context
ctx.toolState.issueNumber = issue_number;
const comments = await ctx.octokit.paginate(ctx.octokit.rest.issues.listComments, {
const comments = await ctx.gitea.paginate(ctx.gitea.rest.issue.issueGetComments, {
owner: ctx.repo.owner,
repo: ctx.repo.name,
issue_number,
index: issue_number,
});
return {
issue_number,
comments: comments.map((comment) => ({
id: comment.id,
body: comment.body,
user: comment.user?.login,
comments: comments.map((c) => ({
id: c.id,
body: c.body,
user: c.user?.login,
})),
count: comments.length,
};