(prString: string)
| 48 | * @returns Parsed PR object or null if invalid format |
| 49 | */ |
| 50 | export 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…