MCPcopy
hub / github.com/promptfoo/promptfoo / postGeneralComments

Function postGeneralComments

code-scan-action/src/main.ts:444–465  ·  view source on GitHub ↗
(
  octokit: ReturnType<typeof github.getOctokit>,
  context: PullRequestContext,
  generalComments: Comment[],
)

Source from the content-addressed store, hash-verified

442}
443
444async function postGeneralComments(
445 octokit: ReturnType<typeof github.getOctokit>,
446 context: PullRequestContext,
447 generalComments: Comment[],
448): Promise<void> {
449 if (generalComments.length === 0) {
450 return;
451 }
452
453 core.info(`💬 Posting ${generalComments.length} general comments...`);
454
455 for (const comment of generalComments) {
456 await octokit.rest.issues.createComment({
457 owner: context.owner,
458 repo: context.repo,
459 issue_number: context.number,
460 body: buildGeneralCommentBody(comment),
461 });
462 }
463
464 core.info('✅ General comments posted successfully');
465}
466
467async function postFallbackComments(
468 githubToken: string,

Callers 1

postFallbackCommentsFunction · 0.85

Calls 1

buildGeneralCommentBodyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…