* gh pr merge/close/ready print "✓ pull request owner/repo#1234" with * no URL. Extract the PR number from the text.
(stdout: string)
| 102 | * no URL. Extract the PR number from the text. |
| 103 | */ |
| 104 | function parsePrNumberFromText(stdout: string): number | undefined { |
| 105 | const match = stdout.match(/[Pp]ull request (?:\S+#)?#?(\d+)/) |
| 106 | return match?.[1] ? parseInt(match[1], 10) : undefined |
| 107 | } |
| 108 | |
| 109 | /** |
| 110 | * Extract target ref from `git merge <ref>` / `git rebase <ref>` command. |
no outgoing calls
no test coverage detected