fix: issues with pagination not resolving correct url templates
This commit is contained in:
+5
-6
@@ -67,12 +67,11 @@ export function SelectModeTool(ctx: ToolContext) {
|
||||
// For Plan mode with issue_number, look up existing plan comment
|
||||
if (foundMode.name === "Plan" && issue_number !== undefined) {
|
||||
try {
|
||||
const commentsResp = await ctx.gitea.paginate(ctx.gitea.rest.issue.issueGetComments, {
|
||||
owner: ctx.repo.owner,
|
||||
repo: ctx.repo.name,
|
||||
index: issue_number,
|
||||
});
|
||||
const comments = commentsResp;
|
||||
const commentsR = await ctx.gitea.request(
|
||||
"GET /repos/{owner}/{repo}/issues/{index}/comments",
|
||||
{ owner: ctx.repo.owner, repo: ctx.repo.name, index: issue_number, limit: 50 }
|
||||
);
|
||||
const comments = commentsR.data as Array<{ id?: number; body?: string | null }>;
|
||||
// Look for a plan comment (one with our footer)
|
||||
const planComment = comments.find((c) => c.body?.includes("<!-- shockbot-footer -->"));
|
||||
if (planComment) {
|
||||
|
||||
Reference in New Issue
Block a user