Find a GitHub PR URL embedded anywhere in stdout and parse it.
(stdout: string)
| 71 | |
| 72 | /** Find a GitHub PR URL embedded anywhere in stdout and parse it. */ |
| 73 | function findPrInStdout(stdout: string): ReturnType<typeof parsePrUrl> { |
| 74 | const m = stdout.match(/https:\/\/github\.com\/[^/\s]+\/[^/\s]+\/pull\/\d+/) |
| 75 | return m ? parsePrUrl(m[0]) : null |
| 76 | } |
| 77 | |
| 78 | // Exported for testing purposes |
| 79 | export function parseGitCommitId(stdout: string): string | undefined { |
no test coverage detected