Add possibility to cancel projects import from GitHub
What does this MR do and why?
Add the possibility to cancel projects import from GitHub issue
Screenshots or screen recordings
Public API endpoint POST {{host}}/api/v4/import/github/cancel
If the given id was an id of not existing project or id of project with provider other than GitHub it will return 404 error
If the project was not in started
or scheduled
state it will return an error message:
Private API endpoint POST {{host}}/import/github/cancel.json
How to set up and validate locally
Public API:
- Start import with
POST {{host}}/api/v4/import/github
- Check import status, it has to be
scheduled
orstarted
- Cancel import with
POST {{host}}/api/v4/import/github/cancel
Request body:{ "project_id": 12345 }
Whereproject_id
is the ID of the Gitlab project to be canceled.
Private API:
- Start import with
POST {{host}}/import/github.json
or from UI - Check import status, it has to be
scheduled
orstarted
- Cancel import with
POST {{host}}/api/v4/import/github/cancel
Request body:{ "project_id": 12345 }
Whereproject_id
is the ID of the Gitlab project to be canceled.
Edited by Kristina Doskich