From fd56da5922d6589d03f0cb259f3366430aae2caf Mon Sep 17 00:00:00 2001 From: alma Date: Tue, 6 May 2025 20:13:10 +0200 Subject: [PATCH] missions api2 gitea --- lib/services/integration-service.ts | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/lib/services/integration-service.ts b/lib/services/integration-service.ts index 9972fc1d..f172f857 100644 --- a/lib/services/integration-service.ts +++ b/lib/services/integration-service.ts @@ -235,7 +235,7 @@ export class IntegrationService { * @param rocketChatChannelId The Rocket.Chat channel ID to delete * @param giteaRepositoryUrl The Gitea repository URL to extract owner/repo from for deletion */ - private async rollbackIntegrations( + public async rollbackIntegrations( leantimeProjectId?: number, outlineCollectionId?: string, rocketChatChannelId?: string, @@ -322,28 +322,4 @@ export class IntegrationService { } } catch (giteaError) { console.error('Error during Gitea rollback:', giteaError); - console.log(`⚠️ Note: Gitea repository at ${giteaRepositoryUrl} may need to be deleted manually`); - } - } else { - console.log('No Gitea repository was created, skipping rollback'); - // Mark as successful since there's nothing to delete - rollbackStatuses.gitea = true; - } - - // Provide a summary of rollback operations - console.log('Rollback summary:', JSON.stringify(rollbackStatuses)); - - // If any rollbacks failed, provide a note - if (!rollbackStatuses.leantime || !rollbackStatuses.outline || !rollbackStatuses.rocketchat || !rollbackStatuses.gitea) { - console.log('⚠️ Some resources may need to be deleted manually.'); - } - } catch (error) { - console.error('Error during rollback:', error); - console.log('⚠️ Resources may need to be deleted manually:'); - if (leantimeProjectId) console.log(`- Leantime project: ${leantimeProjectId}`); - if (outlineCollectionId) console.log(`- Outline collection: ${outlineCollectionId}`); - if (rocketChatChannelId) console.log(`- Rocket.Chat channel: ${rocketChatChannelId}`); - if (giteaRepositoryUrl) console.log(`- Gitea repository: ${giteaRepositoryUrl}`); - } - } -} \ No newline at end of file + console.log(` \ No newline at end of file