Skip to content

Commit f970f83

Browse files
committed
chore: add gh comments api
1 parent 40af94a commit f970f83

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

packages/agent/src/git-manager.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,4 +592,15 @@ Generated by PostHog Agent`;
592592
return false;
593593
}
594594
}
595+
596+
async getAllPullRequestComments(prNumber: number): Promise<string> {
597+
try {
598+
const output = await this.runCommand(
599+
`gh pr view ${prNumber} --comments --json comments`,
600+
);
601+
return output;
602+
} catch (error) {
603+
throw new Error(`Failed to fetch PR comments: ${error}`);
604+
}
605+
}
595606
}

0 commit comments

Comments
 (0)