missions api2 gitea

This commit is contained in:
alma 2025-05-06 20:13:10 +02:00
parent a150329ee6
commit fd56da5922

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
*/
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}`);
}
}
}
console.log(`