(opts)
| 37 | }; |
| 38 | |
| 39 | const ownerRepo = (opts) => { |
| 40 | let owner, repo; |
| 41 | const { uri } = opts; |
| 42 | |
| 43 | if (uri) { |
| 44 | const { pathname } = new URL(uri); |
| 45 | [owner, repo] = pathname.substr(1).split('/'); |
| 46 | } else if (GITHUB_REPOSITORY) { |
| 47 | [owner, repo] = GITHUB_REPOSITORY.split('/'); |
| 48 | } |
| 49 | |
| 50 | return { owner, repo }; |
| 51 | }; |
| 52 | |
| 53 | const octokit = (token, repo, log) => { |
| 54 | if (!token) throw new Error('token not found'); |
no outgoing calls
no test coverage detected