* Parse owner and repo from a repository slug * @param {string} repoSlug - Repository slug in "owner/repo" format * @returns {RepoParts|null}
(repoSlug)
| 205 | * @returns {RepoParts|null} |
| 206 | */ |
| 207 | function parseRepoSlug(repoSlug) { |
| 208 | const parts = repoSlug.split("/"); |
| 209 | if (parts.length !== 2 || !parts[0] || !parts[1]) { |
| 210 | return null; |
| 211 | } |
| 212 | return { owner: parts[0], repo: parts[1] }; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Resolve target repository configuration from handler config |
no outgoing calls
no test coverage detected