()
| 63 | } |
| 64 | |
| 65 | export async function getGithubUser(): Promise<GitHubUserInfo> { |
| 66 | const token = await getPlainServiceToken('github'); |
| 67 | if (!token) { |
| 68 | throw new GitHubError('GitHub token not configured', 401); |
| 69 | } |
| 70 | |
| 71 | const data = (await githubFetch(token, '/user')) as any; |
| 72 | return { |
| 73 | login: data.login, |
| 74 | name: data.name, |
| 75 | email: data.email, |
| 76 | }; |
| 77 | } |
| 78 | |
| 79 | export async function checkRepositoryAvailability(repoName: string) { |
| 80 | const token = await getPlainServiceToken('github'); |
no test coverage detected