provide a way to disconnect github repo (#47)

This commit is contained in:
Will Chen
2025-04-29 12:12:47 -07:00
committed by GitHub
parent a33e6c6ae3
commit a53d72701b
4 changed files with 89 additions and 4 deletions

View File

@@ -611,9 +611,24 @@ export class IpcClient {
): Promise<{ success: boolean; error?: string }> {
try {
const result = await this.ipcRenderer.invoke("github:push", { appId });
return result;
} catch (error: any) {
return { success: false, error: error.message || "Unknown error" };
return result as { success: boolean; error?: string };
} catch (error) {
showError(error);
throw error;
}
}
public async disconnectGithubRepo(
appId: number
): Promise<{ success: boolean; error?: string }> {
try {
const result = await this.ipcRenderer.invoke("github:disconnect", {
appId,
});
return result as { success: boolean; error?: string };
} catch (error) {
showError(error);
throw error;
}
}
// --- End GitHub Repo Management ---