Closed
Description
The documentation indicates that you can erase a build:
build.delete()
But when I try to do this, I get a NotImplementedError
:
File "/usr/lib/python2.7/site-packages/gitlab/objects.py", line 326, in delete
raise NotImplementedError
NotImplementedError
This happens because canDelete = False
in the ProjectBuild
class.
For whatever reason, the GitLab team decided to make erasing a build a POST /projects/:id/builds/:build_id/erase
, instead of a DELETE
, like many of their other APIs.
Regardless, it looks like we will need to special-case this operation to POST. Which option would you prefer?
- Override the
delete
method ofProjectBuild
- Add an
erase
method toProjectBuild
Seeing as GitLab might make the deletion more fine-grained in the future (e.g. I hope they eventually allow erasing only artifacts, keeping the trace), I would prefer option 2.
GitLab version: 8.12.3
python-gitlab version: 0.15.1
Metadata
Metadata
Assignees
Labels
No labels