(url: string)
| 12 | } |
| 13 | |
| 14 | function parseGitHubOwnerAndName(url: string): { owner: string; name: string } { |
| 15 | const match = url.match(/github\.com[/:]([^/]+)\/([^/.]+)/); |
| 16 | if (!match) { |
| 17 | throw new Error(`Cannot parse GitHub owner/name from repository URL: ${url}`); |
| 18 | } |
| 19 | return { owner: match[1], name: match[2] }; |
| 20 | } |
| 21 | |
| 22 | const VERSION_REGEX = /^v?[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.\-]+)?(\+[a-zA-Z0-9.\-]+)?$/; |
| 23 |