summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--ChangeLog.rst6
-rw-r--r--gitlab/v4/objects.py27
3 files changed, 19 insertions, 19 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b91d88f..7faf8d6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,9 +32,10 @@ deploy_image:
deploy-latest:
stage: deploy-latest
- image: golang:1.12.4-stretch
+ image:
+ name: gcr.io/go-containerregistry/crane:debug
+ entrypoint: [""]
script:
- - go get github.com/google/go-containerregistry/cmd/crane
- mkdir /root/.docker && echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
- crane cp $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG $CI_REGISTRY_IMAGE:latest
only:
diff --git a/ChangeLog.rst b/ChangeLog.rst
index a6afe0b..a957e57 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,5 +1,7 @@
-ChangeLog
-=========
+ChangeLog - Moved to GitHub releases
+====================================
+
+The changes of newer versions can be found at https://github.com/python-gitlab/python-gitlab/releases
Version 1.9.0_ - 2019-06-19
---------------------------
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 220cf12..62e8d4a 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2140,7 +2140,7 @@ class ProjectFork(RESTObject):
class ProjectForkManager(CreateMixin, ListMixin, RESTManager):
- _path = "/projects/%(project_id)s/fork"
+ _path = "/projects/%(project_id)s/forks"
_obj_cls = ProjectFork
_from_parent_attrs = {"project_id": "id"}
_list_filters = (
@@ -2160,27 +2160,24 @@ class ProjectForkManager(CreateMixin, ListMixin, RESTManager):
)
_create_attrs = (tuple(), ("namespace",))
- def list(self, **kwargs):
- """Retrieve a list of objects.
+ def create(self, data, **kwargs):
+ """Creates a new object.
Args:
- all (bool): If True, return all the items, without pagination
- per_page (int): Number of items to retrieve per request
- page (int): ID of the page to return (starts with page 1)
- as_list (bool): If set to False and no pagination option is
- defined, return a generator instead of a list
+ data (dict): Parameters to send to the server to create the
+ resource
**kwargs: Extra options to send to the server (e.g. sudo)
- Returns:
- list: The list of objects, or a generator if `as_list` is False
-
Raises:
GitlabAuthenticationError: If authentication is not correct
- GitlabListError: If the server cannot perform the request
- """
+ GitlabCreateError: If the server cannot perform the request
- path = self._compute_path("/projects/%(project_id)s/forks")
- return ListMixin.list(self, path=path, **kwargs)
+ Returns:
+ RESTObject: A new instance of the managed object class build with
+ the data sent by the server
+ """
+ path = self.path[:-1] # drop the 's'
+ return CreateMixin.create(self, data, path=path, **kwargs)
class ProjectHook(SaveMixin, ObjectDeleteMixin, RESTObject):