({ url, hostname, service, owner, repo })
| 32 | * @param repo - Repository name |
| 33 | */ |
| 34 | const validateUrl = ({ url, hostname, service, owner, repo }) => { |
| 35 | if (url.hostname !== hostname || !owner || !repo) { |
| 36 | const errorMessage = `The URL must be a valid ${service} URL in the following format: https://${hostname}/owner/repo` |
| 37 | throw new Error(errorMessage) |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Check if the URL is pointing to a Git repository |
no outgoing calls
no test coverage detected
searching dependent graphs…