missions api2 gitea
This commit is contained in:
parent
a150329ee6
commit
fd56da5922
@ -235,7 +235,7 @@ export class IntegrationService {
|
|||||||
* @param rocketChatChannelId The Rocket.Chat channel ID to delete
|
* @param rocketChatChannelId The Rocket.Chat channel ID to delete
|
||||||
* @param giteaRepositoryUrl The Gitea repository URL to extract owner/repo from for deletion
|
* @param giteaRepositoryUrl The Gitea repository URL to extract owner/repo from for deletion
|
||||||
*/
|
*/
|
||||||
private async rollbackIntegrations(
|
public async rollbackIntegrations(
|
||||||
leantimeProjectId?: number,
|
leantimeProjectId?: number,
|
||||||
outlineCollectionId?: string,
|
outlineCollectionId?: string,
|
||||||
rocketChatChannelId?: string,
|
rocketChatChannelId?: string,
|
||||||
@ -322,28 +322,4 @@ export class IntegrationService {
|
|||||||
}
|
}
|
||||||
} catch (giteaError) {
|
} catch (giteaError) {
|
||||||
console.error('Error during Gitea rollback:', giteaError);
|
console.error('Error during Gitea rollback:', giteaError);
|
||||||
console.log(`⚠️ Note: Gitea repository at ${giteaRepositoryUrl} may need to be deleted manually`);
|
console.log(`
|
||||||
}
|
|
||||||
} 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}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user