tests and better diffs (#163)

* refactor get_review_comments to use reviewThreads graphql api with full thread context and proper diff extraction

* Improve get_review_comments output

* Improve tests and diffs

* GH_TOKEN

* Added back approved_by

* Fix CI
This commit is contained in:
Colin McDonnell
2026-01-23 06:28:22 +00:00
committed by pullfrog[bot]
parent 9a8db3e07c
commit 7621d6f0e5
11 changed files with 1196 additions and 370 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ export function CommitInfoTool(ctx: ToolContext) {
const files = data.files ?? [];
// format diff with line numbers and write to file
const diffContent = formatFilesWithLineNumbers(files);
const formatResult = formatFilesWithLineNumbers(files);
const tempDir = process.env.PULLFROG_TEMP_DIR;
if (!tempDir) {
throw new Error(
@@ -36,8 +36,8 @@ export function CommitInfoTool(ctx: ToolContext) {
);
}
const diffFile = join(tempDir, `commit-${sha.slice(0, 7)}.diff`);
writeFileSync(diffFile, diffContent);
log.debug(`wrote commit diff to ${diffFile} (${diffContent.length} bytes)`);
writeFileSync(diffFile, formatResult.content);
log.debug(`wrote commit diff to ${diffFile} (${formatResult.content.length} bytes)`);
return {
sha: data.sha,