missions api2 gitea

This commit is contained in:
alma 2025-05-06 20:14:24 +02:00
parent fd56da5922
commit f2a08fbadb

View File

@ -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
*/
public async rollbackIntegrations(
private async rollbackIntegrations(
leantimeProjectId?: number,
outlineCollectionId?: string,
rocketChatChannelId?: string,
@ -322,4 +322,28 @@ export class IntegrationService {
}
} catch (giteaError) {
console.error('Error during Gitea rollback:', giteaError);
console.log(`
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}`);
}
}
}