Switch back to grpahql for review threads

This commit is contained in:
Colin McDonnell
2026-01-20 23:59:52 +00:00
committed by pullfrog[bot]
parent a5fffc97a5
commit d98f6c8029
5 changed files with 431 additions and 93 deletions
+14 -1
View File
@@ -1,4 +1,5 @@
import type { ToolState } from "../mcp/server.ts";
import { buildPullfrogFooter } from "./buildPullfrogFooter.ts";
import { createOctokit, parseRepoContext } from "./github.ts";
import { getGitHubInstallationToken } from "./token.ts";
@@ -18,11 +19,23 @@ export async function reportErrorToComment(ctx: ReportErrorParams): Promise<void
const repoContext = parseRepoContext();
const octokit = createOctokit(getGitHubInstallationToken());
const runId = process.env.GITHUB_RUN_ID;
// build footer with workflow run link
const footer = buildPullfrogFooter({
triggeredBy: true,
workflowRun: runId
? { owner: repoContext.owner, repo: repoContext.name, runId }
: undefined,
});
await octokit.rest.issues.updateComment({
owner: repoContext.owner,
repo: repoContext.name,
comment_id: commentId,
body: formattedError,
body: `${formattedError}${footer}`,
});
// mark as updated so ensureProgressCommentUpdated doesn't try to update again
ctx.toolState.progressComment.wasUpdated = true;
}