From a745fd7b84d24efd451985b606957b16dc583a0b Mon Sep 17 00:00:00 2001 From: gouravkrosx Date: Fri, 18 Apr 2025 15:12:22 +0530 Subject: [PATCH] fix: github signIN and remove starring github Signed-off-by: gouravkrosx --- src/SignIn.ts | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/SignIn.ts b/src/SignIn.ts index 37a6aaf..683bee6 100644 --- a/src/SignIn.ts +++ b/src/SignIn.ts @@ -29,26 +29,6 @@ async function fetchGitHubEmail(accessToken: string): Promise { return null; } } -async function starGitHubRepo(accessToken: string, owner: string, repo: string): Promise { - console.log('Starring the repository:', owner, repo, accessToken); - try { - const response = await axios.put(`https://api.github.com/user/starred/${owner}/${repo}`, null, { - headers: { - 'Authorization': `Bearer ${accessToken}`, - 'Accept': 'application/vnd.github+json', - 'Content-Length': '0', - }, - }); - - if (response.status === 204) { - console.log(`Successfully starred the repository`); - } else { - throw new Error(`Failed to star repository. GitHub API responded with status ${response.status}`); - } - } catch (error) { - vscode.window.showErrorMessage(`Failed to star repository: ${error}`); - } -} export async function getGitHubAccessToken() { try { @@ -60,10 +40,7 @@ export async function getGitHubAccessToken() { // Fetch the user's email const email = await fetchGitHubEmail(accessToken); - const owner = 'keploy'; - const repo = 'keploy'; - await starGitHubRepo(accessToken, owner, repo); - + return { accessToken, email }; } else { vscode.window.showErrorMessage('Failed to get GitHub session.');