(err: ImportTokenError, codeUrl: string)
| 54 | } |
| 55 | |
| 56 | function errorMessage(err: ImportTokenError, codeUrl: string): string { |
| 57 | switch (err.kind) { |
| 58 | case 'not_signed_in': |
| 59 | return `Login failed. Please visit ${codeUrl} and login using the GitHub App`; |
| 60 | case 'invalid_token': |
| 61 | return 'GitHub rejected that token. Run `gh auth login` and try again.'; |
| 62 | case 'server': |
| 63 | return `Server error (${err.status}). Try again in a moment.`; |
| 64 | case 'network': |
| 65 | return "Couldn't reach the server. Check your connection."; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | type Step = { name: 'checking' } | { name: 'confirm'; token: RedactedGithubToken } | { name: 'uploading' }; |
| 70 |
no outgoing calls
no test coverage detected