| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1656,8 +1656,26 @@ class ProjectForkManager(CreateMixin, ListMixin, RESTManager): | |||
| 1656 | 1656 | _create_attrs = (tuple(), ('namespace', )) | |
| 1657 | 1657 | ||
| 1658 | 1658 | def list(self, **kwargs): | |
| 1659 | - computed_path = self._compute_path(path=(self._path + "s")) | ||
| 1660 | - return super(ProjectForkManager, self).list(path=computed_path, **kwargs) | ||
| 1659 | + """Retrieve a list of objects. | ||
| 1660 | + | ||
| 1661 | + Args: | ||
| 1662 | + all (bool): If True, return all the items, without pagination | ||
| 1663 | + per_page (int): Number of items to retrieve per request | ||
| 1664 | + page (int): ID of the page to return (starts with page 1) | ||
| 1665 | + as_list (bool): If set to False and no pagination option is | ||
| 1666 | + defined, return a generator instead of a list | ||
| 1667 | + **kwargs: Extra options to send to the server (e.g. sudo) | ||
| 1668 | + | ||
| 1669 | + Returns: | ||
| 1670 | + list: The list of objects, or a generator if `as_list` is False | ||
| 1671 | + | ||
| 1672 | + Raises: | ||
| 1673 | + GitlabAuthenticationError: If authentication is not correct | ||
| 1674 | + GitlabListError: If the server cannot perform the request | ||
| 1675 | + """ | ||
| 1676 | + | ||
| 1677 | + path = self._compute_path('/projects/%(project_id)s/forks') | ||
| 1678 | + return ListMixin.list(self, path=path, **kwargs) | ||
| 1661 | 1679 | ||
| 1662 | 1680 | ||
| 1663 | 1681 | class ProjectHook(SaveMixin, ObjectDeleteMixin, RESTObject): | |
@@ -1813,7 +1831,7 @@ def move(self, to_project_id, **kwargs): | |||
| 1813 | 1831 | path = '%s/%s/move' % (self.manager.path, self.get_id()) | |
| 1814 | 1832 | data = {'to_project_id': to_project_id} | |
| 1815 | 1833 | server_data = self.manager.gitlab.http_post(path, post_data=data, | |
| 1816 | - **kwargs) | ||
| 1834 | + **kwargs) | ||
| 1817 | 1835 | self._update_attrs(server_data) | |
| 1818 | 1836 | ||
| 1819 | 1837 | @cli.register_custom_action('ProjectIssue') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments