MCPcopy Create free account
hub / github.com/promptfoo/promptfoo / parseGitHubPr

Function parseGitHubPr

src/codeScan/util/github.ts:50–62  ·  view source on GitHub ↗
(prString: string)

Source from the content-addressed store, hash-verified

48 * @returns Parsed PR object or null if invalid format
49 */
50export function parseGitHubPr(prString: string): ParsedGitHubPR | null {
51 const match = prString.match(/^([^/]+)\/([^#]+)#(\d+)$/);
52 if (!match) {
53 return null;
54 }
55
56 const [, owner, repo, prNumber] = match;
57 return {
58 owner,
59 repo,
60 number: parseInt(prNumber, 10),
61 };
62}
63
64/**
65 * Prepare comments and review body for GitHub posting

Callers 1

executeScanFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…