Delete imported projects after user canceled import
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=364707) </details> <!--IssueSummary end--> ## Problem to solve This issue is the second iteration of [Cancel project imports](https://gitlab.com/gitlab-org/gitlab/-/issues/247325/) Currently, when a user imports projects into GitLab there is no way for them to cancel an import in-progress. The below scenario illustrates the problem: #### Import all repositories 1. User authenticates their GitHub account. :slight_smile: 1. Selects "Import 234 repositories" from the `Import repositories from GitHub` page which initiates the import. :slight_smile: 1. User realizes they had made a mistake and needs to cancel their import and correct the error. :confused: 1. User finds no way to cancel the import. :rage: 1. User must go into GitLab project settings for each imported project and delete them manually. :weary: This process is quite cumbersome and could cause a lot of frustration for the users. In [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/247325/), we enabled `Cancel` option, but the data that already imported will be retained. In this issue we will enable `Delete` of the imported data. ### Proposal Implement `Cancel and Delete` button. * User can start the cancel process when an import is: * Pending * In progress * User can't cancel after an import is complete. * An import that is cancelled can not be resumed\* * The cancel process has two outcomes: * Cancel and retain — Importing stops, anything that has been imported stays in the project (implemented [here](https://gitlab.com/gitlab-org/gitlab/-/issues/247325/)) * Cancel and delete — Importing stops, anything that has been imported is deleted * Users can choose the outcome — `cancel and retain` or `cancel and delete`. | Example user flow | | ------ | | ![image](/uploads/53d72f719c5b90f0f49070db855f49d5/image.png) | | [Source](https://www.figma.com/file/lK3873uXEMUGmaC7nHkx5G/GitHub-Importer?node-id=2108%3A52354) | The scope of this issue is for GitHub importer.
issue