| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add BulkImport.cancel() to support POST /bulk_imports/:id/cancel per GitLab docs https://docs.gitlab.com/api/bulk_imports/#cancel-a-migration. Mirrors ProjectPipeline.cancel pattern, uses GitlabCancelError and cli.register_custom_action, verified with responses mock and pytest. Closes python-gitlab#3292
Codecov Report❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #3440 +/- ##
==========================================
- Coverage 95.78% 95.76% -0.03%
==========================================
Files 100 100
Lines 6172 6181 +9
==========================================
+ Hits 5912 5919 +7
- Misses 260 262 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #3292.
Problem
API POST /bulk_imports/:id/cancel documented at https://docs.gitlab.com/api/bulk_imports/#cancel-a-migration was missing in BulkImport model (gitlab/v4/objects/bulk_imports.py:17). No way to cancel a migration via python-gitlab.
Solution
Mirrors ProjectPipeline.cancel (gitlab/v4/objects/pipelines.py:67-80), single file, 15 lines, no cross-folder changes. Uses existing GitlabCancelError (no new exception).
Verification (folder-local only, no global installs)
Stars: 2472★ (not zero), updated 2026, no duplicate PR (checked closed_by_pull_requests).
Closes #3292