summaryrefslogtreecommitdiff
path: root/gitlab/v4
Commit message (Collapse)AuthorAgeFilesLines
* chore: create return type-hints for `get_id()` & `encoded_id`John L. Villalovos2022-01-141-0/+2
| | | | | | Create return type-hints for `RESTObject.get_id()` and `RESTObject.encoded_id`. Previously was saying they return Any. Be more precise in saying they can return either: None, str, or int.
* chore(groups): use encoded_id for group pathNejc Habjan2022-01-131-1/+1
|
* feat: add support for Groups API method `transfer()`Christian Sattler2022-01-131-1/+23
|
* chore(objects): use `self.encoded_id` where applicableJohn L. Villalovos2022-01-132-7/+7
| | | | | | | | Updated a few remaining usages of `self.id` to use `self.encoded_id` as for the most part we shouldn't be using `self.id` There are now only a few (4 lines of code) remaining uses of `self.id`, most of which seem that they should stay that way.
* Merge pull request #1835 from python-gitlab/jlvillal/id_to_encodedidNejc Habjan2022-01-142-3/+3
|\ | | | | chore(objects): use `self.encoded_id` where could be a string
| * chore(objects): use `self.encoded_id` where could be a stringJohn L. Villalovos2022-01-132-3/+3
| | | | | | | | | | Updated a few remaining usages of `self.id` to use `self.encoded_id` where it could be a string value.
* | chore(projects): fix typing for transfer methodNejc Habjan2022-01-131-1/+1
| | | | | | Co-authored-by: John Villalovos <john@sodarock.com>
* | feat(api): add `project.transfer()` and deprecate `transfer_project()`Nejc Habjan2022-01-131-1/+11
|/
* Merge pull request #1819 from python-gitlab/jlvillal/encoded_idNejc Habjan2022-01-1317-82/+82
|\ | | | | fix: use url-encoded ID in all paths
| * chore: replace usage of utils._url_encode() with utils.EncodedId()jlvillal/encoded_idJohn L. Villalovos2022-01-134-9/+9
| | | | | | | | | | | | utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don't need it.
| * chore: add EncodedId string class to use to hold URL-encoded pathsJohn L. Villalovos2022-01-131-1/+1
| | | | | | | | | | | | | | | | | | Add EncodedId string class. This class returns a URL-encoded string but ensures it will only URL-encode it once even if recursively called. Also added some functional tests of 'lazy' objects to make sure they work.
| * fix: use url-encoded ID in all pathsJohn L. Villalovos2022-01-1314-72/+72
| | | | | | | | | | | | | | | | | | | | | | | | Make sure all usage of the ID in the URL path is encoded. Normally it isn't an issue as most IDs are integers or strings which don't contain a slash ('/'). But when the ID is a string with a slash character it will break things. Add a test case that shows this fixes wikis issue with subpages which use the slash character. Closes: #1079
* | Merge pull request #1827 from python-gitlab/jlvillal/all_objectsNejc Habjan2022-01-131-6/+16
|\ \ | | | | | | fix: members: use new *All objects for *AllManager managers
| * | fix(members): use new *All objects for *AllManager managersJohn L. Villalovos2022-01-131-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change it so that: GroupMemberAllManager uses GroupMemberAll object ProjectMemberAllManager uses ProjectMemberAll object Create GroupMemberAll and ProjectMemberAll objects that do not support any Mixin type methods. Previously we were using GroupMember and ProjectMember which support the `save()` and `delete()` methods but those methods will not work with objects retrieved using the `/members/all/` API calls. `list()` API calls: [1] GET /groups/:id/members/all GET /projects/:id/members/all `get()` API calls: [2] GET /groups/:id/members/all/:user_id GET /projects/:id/members/all/:user_id Closes: #1825 Closes: #848 [1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members [2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
* | | fix(cli): add missing list filters for environmentsNejc Habjan2022-01-131-0/+1
| |/ |/|
* | fix(api): services: add missing `lazy` parameterjlvillal/lazy_serviceJohn L. Villalovos2022-01-131-1/+9
|/ | | | | | | | Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the `lazy` parameter to the services `get()` method but missed then using the `lazy` parameter when it called `super(...).get(...)` Closes: #1828
* feat: add support for Group Access Token APIFabio Huser2022-01-092-0/+19
| | | | See https://docs.gitlab.com/ee/api/group_access_tokens.html
* fix: remove custom URL encodingJohn L. Villalovos2022-01-084-10/+12
| | | | | | | | | | We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils._url_encode()` function which itself uses `urllib.parse.quote()` Closes: #1356
* fix: remove default arguments for mergerequests.merge()John L. Villalovos2022-01-081-4/+4
| | | | | | | | | | The arguments `should_remove_source_branch` and `merge_when_pipeline_succeeds` are optional arguments. We should not be setting any default value for them. https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr Closes: #1750
* fix(cli): url-encode path components of the URLJohn L. Villalovos2022-01-081-2/+18
| | | | | | | | | | | | | In the CLI we need to make sure the components put into the path portion of the URL are url-encoded. Otherwise they will be interpreted as part of the path. For example can specify the project ID as a path, but in the URL it must be url-encoded or it doesn't work. Also stop adding the components of the path as query parameters in the URL. Closes: #783 Closes: #1498
* Merge pull request #1809 from python-gitlab/jlvillal/list_apiNejc Habjan2022-01-081-8/+11
|\ | | | | fix: change to `http_list` for some ProjectCommit methods
| * fix: change to `http_list` for some ProjectCommit methodsJohn L. Villalovos2022-01-081-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fix the type-hints and use `http_list()` for the ProjectCommits methods: - diff() - merge_requests() - refs() This will enable using the pagination support we have for lists. Closes: #1805 Closes: #1231
* | chore: fix missing commajlvillal/missing_commaJohn L. Villalovos2022-01-071-1/+2
|/ | | | | There was a missing comma which meant the strings were concatenated instead of being two separate strings.
* chore: add and document optional parameters for get MRjlvillal/rebase_in_progressJohn L. Villalovos2021-12-231-0/+5
| | | | | | | Add and document (some of the) optional parameters that can be done for a `project.merge_requests.get()` Closes #1775
* feat(api): support file format for repository archiveMax Ludwig2021-12-211-2/+6
|
* feat: add support for `squash_option` in Projectsjlvillal/squash_optionJohn L. Villalovos2021-12-132-0/+3
| | | | | | | There is an optional `squash_option` parameter which can be used when creating Projects and UserProjects. Closes #1744
* chore(api): temporarily remove topic delete endpointNejc Habjan2021-12-111-3/+3
| | | | It is not yet available upstream.
* feat(api): add support for Topics APINejc Habjan2021-12-112-0/+28
|
* Merge pull request #1710 from python-gitlab/jlvillal/get_without_idNejc Habjan2021-12-119-9/+85
|\ | | | | chore: add get() methods for GetWithoutIdMixin based classes
| * chore: add get() methods for GetWithoutIdMixin based classesjlvillal/get_without_idJohn L. Villalovos2021-12-089-9/+85
| | | | | | | | | | | | | | Add the get() methods for the GetWithoutIdMixin based classes. Update the tests/meta/test_ensure_type_hints.py tests to check to ensure that the get methods are defined with the correct return type.
* | feat: add delete on package_file objectSimon Hébert-Deschamps2021-12-091-1/+1
|/
* chore: fix pylint error "expression-not-assigned"John L. Villalovos2021-12-071-28/+20
| | | | | | | | Fix pylint error "expression-not-assigned" and remove check from the disabled list. And I personally think it is much more readable now and is less lines of code.
* chore: add initial pylint checkJohn L. Villalovos2021-12-072-13/+21
| | | | | | Initial pylint check is added. A LONG list of disabled checks is also added. In the future we should work through the list and resolve the errors or disable them on a more granular level.
* chore: enable 'warn_redundant_casts' for mypyjlvillal/mypy_strict_two_stepsJohn L. Villalovos2021-12-051-1/+1
| | | | Enable 'warn_redundant_casts'for mypy and resolve one issue.
* docs: use annotations for return typesdocs/sphinx-annotationsNejc Habjan2021-12-0124-77/+77
|
* docs: only use type annotations for documentationNejc Habjan2021-11-2822-209/+209
|
* Merge pull request #1712 from StingRayZA/EpicnotesNejc Habjan2021-11-272-1/+86
|\ | | | | feat(api): add support for epic notes
| * feat(api): add support for epic notesRaimund Hook2021-11-252-1/+86
| | | | | | | | | | | | Added support for notes on group epics Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* | feat: add support for `projects.groups.list()`jlvillal/project_groupsJohn L. Villalovos2021-11-261-0/+19
|/ | | | | | Add support for `projects.groups.list()` endpoint. Closes #1717
* chore: add type-hints to gitlab/v4/objects/files.pyjlvillal/mypy_epicsJohn L. Villalovos2021-11-211-12/+58
|
* chore: add type-hints to gitlab/v4/objects/labels.pyJohn L. Villalovos2021-11-211-6/+37
|
* chore: add type-hints to gitlab/v4/objects/sidekiq.pyJohn L. Villalovos2021-11-211-4/+12
|
* chore: add type-hints to gitlab/v4/objects/services.pyJohn L. Villalovos2021-11-211-5/+15
|
* chore: add type-hints to gitlab/v4/objects/repositories.pyJohn L. Villalovos2021-11-211-13/+48
|
* chore: add type-hints to gitlab/v4/objects/pipelines.pyJohn L. Villalovos2021-11-211-6/+30
|
* chore: add type-hints to gitlab/v4/objects/milestones.pyJohn L. Villalovos2021-11-211-4/+22
|
* chore: add type-hints to gitlab/v4/objects/jobs.pyJohn L. Villalovos2021-11-211-14/+55
|
* chore: add type-hints to gitlab/v4/objects/issues.pyJohn L. Villalovos2021-11-211-6/+33
|
* chore: add type-hints to gitlab/v4/objects/geo_nodes.pyJohn L. Villalovos2021-11-211-7/+23
|
* chore: add type-hints to gitlab/v4/objects/epics.pyJohn L. Villalovos2021-11-211-2/+16
|