summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--ChangeLog.rst29
-rw-r--r--docs/api-usage.rst4
-rw-r--r--docs/gl_objects/builds.rst4
-rw-r--r--gitlab/__init__.py2
-rw-r--r--gitlab/v4/objects.py15
-rw-r--r--tools/python_test_v4.py3
7 files changed, 54 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 28a9c75..ae0c09c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -97,7 +97,7 @@ deploy:
# test package
- python3 -m venv test
- . test/bin/activate
- - pip install -U dist/python-gitlab*.whl
+ - pip install -U dist/python_gitlab*.whl
- gitlab -h
- deactivate
- twine upload --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
diff --git a/ChangeLog.rst b/ChangeLog.rst
index a1450e7..a6afe0b 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,34 @@
ChangeLog
=========
+Version 1.9.0_ - 2019-06-19
+---------------------------
+
+Features
+^^^^^^^^
+
+- implement artifacts deletion
+- add endpoint to get the variables of a pipeline
+- delete ProjectPipeline
+- implement __eq__ and __hash__ methods
+- Allow runpy invocation of CLI tool (python -m gitlab)
+- add project releases api
+- merged new release & registry apis
+
+Bug Fixes
+^^^^^^^^^
+
+- convert # to %23 in URLs
+- pep8 errors
+- use python2 compatible syntax for super
+- Make MemberManager.all() return a list of objects
+- %d replaced by %s
+- Re-enable command specific help messages
+- dont ask for id attr if this is *Manager originating custom action
+- fix -/_ replacament for *Manager custom actions
+- fix repository_id marshaling in cli
+- register cli action for delete_in_bulk
+
Version 1.8.0_ - 2019-02-22
---------------------------
@@ -699,6 +727,7 @@ Version 0.1 - 2013-07-08
* Initial release
+.. _1.9.0: https://github.com/python-gitlab/python-gitlab/compare/1.8.0...1.9.0
.. _1.8.0: https://github.com/python-gitlab/python-gitlab/compare/1.7.0...1.8.0
.. _1.7.0: https://github.com/python-gitlab/python-gitlab/compare/1.6.0...1.7.0
.. _1.6.0: https://github.com/python-gitlab/python-gitlab/compare/1.5.1...1.6.0
diff --git a/docs/api-usage.rst b/docs/api-usage.rst
index 36981b3..2f75584 100644
--- a/docs/api-usage.rst
+++ b/docs/api-usage.rst
@@ -77,8 +77,8 @@ Examples:
# get the group with id == 2
group = gl.groups.get(2)
- for group in groups:
- print()
+ for project in group.projects.list():
+ print(project)
# create a new user
user_data = {'email': 'jen@foo.com', 'username': 'jen', 'name': 'Jen'}
diff --git a/docs/gl_objects/builds.rst b/docs/gl_objects/builds.rst
index d74d9d6..eab4735 100644
--- a/docs/gl_objects/builds.rst
+++ b/docs/gl_objects/builds.rst
@@ -319,6 +319,10 @@ Mark a job artifact as kept when expiration is set::
build_or_job.keep_artifacts()
+Delete the artifacts of a job::
+
+ build_or_job.delete_artifacts()
+
Get a job trace::
build_or_job.trace()
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index fb21985..10c65b1 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -31,7 +31,7 @@ from gitlab.exceptions import * # noqa
from gitlab import utils # noqa
__title__ = "python-gitlab"
-__version__ = "1.8.0"
+__version__ = "1.9.0"
__author__ = "Gauvain Pocentek"
__email__ = "gauvainpocentek@gmail.com"
__license__ = "LGPL3"
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 8fc7150..d15bc5d 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -1585,6 +1585,21 @@ class ProjectJob(RESTObject, RefreshMixin):
self.manager.gitlab.http_post(path)
@cli.register_custom_action("ProjectJob")
+ @exc.on_http_error(exc.GitlabCreateError)
+ def delete_artifacts(self, **kwargs):
+ """Delete artifacts of a job.
+
+ Args:
+ **kwargs: Extra options to send to the server (e.g. sudo)
+
+ Raises:
+ GitlabAuthenticationError: If authentication is not correct
+ GitlabDeleteError: If the request could not be performed
+ """
+ path = "%s/%s/artifacts" % (self.manager.path, self.get_id())
+ self.manager.gitlab.http_delete(path)
+
+ @cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabGetError)
def artifacts(self, streamed=False, action=None, chunk_size=1024, **kwargs):
"""Get the job artifacts.
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index b8dae28..07f3589 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -421,8 +421,9 @@ assert "@@" in admin_project.commits.list()[0].diff()[0]["diff"]
# commit status
commit = admin_project.commits.list()[0]
+size = len(commit.statuses.list())
status = commit.statuses.create({"state": "success", "sha": commit.id})
-assert len(commit.statuses.list()) == 1
+assert len(commit.statuses.list()) == size + 1
assert commit.refs()
assert commit.merge_requests() is not None