* Parse a repository slug in owner/repo format. * @param {unknown} value * @returns {RepoRef|null}
(value)
| 14 | * @returns {RepoRef|null} |
| 15 | */ |
| 16 | function parseRepoSlug(value) { |
| 17 | if (typeof value !== "string") { |
| 18 | return null; |
| 19 | } |
| 20 | |
| 21 | const trimmed = value.trim(); |
| 22 | if (!trimmed) { |
| 23 | return null; |
| 24 | } |
| 25 | |
| 26 | return parseSharedRepoSlug(trimmed); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Normalize a repo object into { owner, repo } shape. |
no outgoing calls
no test coverage detected