Add ProjectBuild.erase() - #159
Merged
Merged
Conversation
We can't use the existing delete() functionality, because GitLab uses `POST /projects/:id/builds/:build_id/erase` to erase a build. Instead of overriding delete(), we add a separate erase() method to keep the naming consistent, and allow potentially more fine-grained operations in the future. - https://docs.gitlab.com/ce/api/builds.html#erase-a-build
Contributor
Author
|
There doesn't appear to be anything in place for testing APIs related to builds, so I haven't added any automated tests. However, I have successfully tested this using a script I'm writing (will be released soon), and it works as expected. |
JonathonReinhart
added a commit
to JonathonReinhart/gitlab-artifact-cleanup
that referenced
this pull request
Oct 2, 2016
Note: This requires using the erase() method that I added to python-gitlab: python-gitlab/python-gitlab#159
Contributor
|
Looks good to me, thanks! |
Contributor
Author
|
@gpocentek Thanks for merging! Any chance this will make it into an official release any time soon? My tool JonathonReinhart/gitlab-artifact-cleanup requires it, and I'm looking to put it on PyPi soon, so it would be great to be able to set a proper minimum version requirement. Currently I'm monkey-patching this functionality in if I find that it is missing. Also FYI: you're missing a |
Contributor
|
@JonathonReinhart 0.15.1 is tagged and I'm preparing the 0.16 release. |
JonathonReinhart
added a commit
to JonathonReinhart/gitlab-artifact-cleanup
that referenced
this pull request
Oct 16, 2016
This is required for ProjectBuild.erase() python-gitlab/python-gitlab#159
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds
ProjectBuild.erase().We can't use the existing delete() functionality, because GitLab uses
POST /projects/:id/builds/:build_id/eraseto erase a build. Instead ofoverriding delete(), we add a separate erase() method to keep the naming
consistent, and allow potentially more fine-grained operations in the
future.
This fixes #158