summaryrefslogtreecommitdiff
path: root/gitlab/v4
Commit message (Collapse)AuthorAgeFilesLines
...
* chore: use built-in function issubclass() instead of getmro()John L. Villalovos2021-05-281-12/+10
| | | | | | | Code was using inspect.getmro() to replicate the functionality of the built-in function issubclass() Switch to using issubclass()
* fix: change mr.merge() to use 'post_data'John L. Villalovos2021-05-251-1/+1
| | | | | | | | | | | | | | | | | | MR https://github.com/python-gitlab/python-gitlab/pull/1121 changed mr.merge() to use 'query_data'. This appears to have been wrong. From the Gitlab docs they state it should be sent in a payload body https://docs.gitlab.com/ee/api/README.html#request-payload since mr.merge() is a PUT request. > Request Payload > API Requests can use parameters sent as query strings or as a > payload body. GET requests usually send a query string, while PUT > or POST requests usually send the payload body Fixes: #1452 Related to: #1120
* feat(objects): add support for billable membersNejc Habjan2021-05-252-1/+34
|
* chore: fix import ordering using isortJohn L. Villalovos2021-05-2558-96/+61
| | | | | | Fix the import ordering using isort. https://pycqa.github.io/isort/
* fix(cli): fix parsing CLI objects to classnamesNejc Habjan2021-05-151-2/+2
|
* feat: add feature to get inherited member for project/groupOleksii Shkurupii2021-05-073-54/+24
|
* Merge pull request #1420 from python-gitlab/fix/missing-list-attributesJohn Villalovos2021-05-0610-12/+62
|\ | | | | fix(objects): make lists work for filters in all objects
| * fix(objects): allow lists for filters for in all objectsfix/missing-list-attributesNejc Habjan2021-04-2710-12/+62
| |
* | fix(objects): return server data in cancel/retry methodsNejc Habjan2021-05-022-4/+4
| |
* | Merge pull request #1438 from python-gitlab/fix/missing-group-attributesJohn Villalovos2021-05-011-0/+9
|\ \ | | | | | | fix(objects): add missing group attributes
| * | fix(objects): add missing group attributesNejc Habjan2021-05-011-0/+9
| |/
* | feat: add code owner approval as attributeDaniel Lanner2021-04-301-0/+1
|/ | | | | The python API was missing the field code_owner_approval_required as implemented in the GitLab REST API.
* fix: iids not working as a list in projects.issues.list()John L. Villalovos2021-04-271-1/+1
| | | | | | | | | Set the 'iids' values as type ListAttribute so it will pass the list as a comma-separated string, instead of a list. Add a functional test. Closes: #1407
* Merge pull request #1352 from JohnVillalovos/jlvillal/fix_mroNejc Habjan2021-04-275-5/+5
|\ | | | | fix: add a check to ensure the MRO is correct
| * fix: add a check to ensure the MRO is correctJohn L. Villalovos2021-04-245-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check to ensure the MRO (Method Resolution Order) is correct for classes in gitlab.v4.objects when doing type-checking. An example of an incorrect definition: class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): ^^^^^^^^^^ This should be at the end. Correct way would be: class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): Correctly at the end ^^^^^^^^^^ Also fix classes which have the issue.
* | Merge pull request #1412 from JohnVillalovos/jlvillal/optional_get_attrsNejc Habjan2021-04-261-7/+4
|\ \ | | | | | | chore: make Get.*Mixin._optional_get_attrs always present
| * | chore: make Get.*Mixin._optional_get_attrs always presentJohn L. Villalovos2021-04-241-7/+4
| |/ | | | | | | | | | | | | | | Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute with a default value of tuple() This way we don't need to use hasattr() and we will know the type of the attribute.
* | fix(files): do not url-encode file paths twiceNejc Habjan2021-04-261-1/+0
| |
* | Merge pull request #1411 from JohnVillalovos/jlvillal/list_filtersMax Wittig2021-04-251-7/+4
|\ \ | | | | | | chore: make ListMixin._list_filters always present
| * | chore: make ListMixin._list_filters always presentJohn L. Villalovos2021-04-241-7/+4
| |/ | | | | | | | | | | | | | | Always create ListMixin._list_filters attribute with a default value of tuple(). This way we don't need to use hasattr() and we will know the type of the attribute.
* | Merge pull request #1410 from JohnVillalovos/jlvillal/short_print_attrMax Wittig2021-04-251-1/+1
|\ \ | | | | | | chore: make RESTObject._short_print_attrs always present
| * | chore: make RESTObject._short_print_attrs always presentJohn L. Villalovos2021-04-241-1/+1
| |/ | | | | | | | | | | | | | | Always create RESTObject._short_print_attrs with a default value of None. This way we don't need to use hasattr() and we will know the type of the attribute.
* | chore(objects): remove noisy deprecation warning for audit eventschore/remove-noisy-deprecation-warningNejc Habjan2021-04-251-18/+0
|/ | | | It's mostly an internal thing anyway and can be removed in 3.0.0
* Merge pull request #1405 from JohnVillalovos/jlvillal/returns_bytesMax Wittig2021-04-231-2/+2
|\ | | | | fix: correct ProjectFile.decode() documentation
| * fix: correct ProjectFile.decode() documentationJohn L. Villalovos2021-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ProjectFile.decode() returns 'bytes' and not 'str'. Update the method's doc-string and add a type-hint. ProjectFile.decode() returns the result of a call to base64.b64decode() The docs for that function state it returns 'bytes': https://docs.python.org/3/library/base64.html#base64.b64decode Fixes: #1403
* | Merge pull request #1397 from JohnVillalovos/jlvillal/flake8Max Wittig2021-04-2317-88/+84
|\ \ | |/ |/| Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
| * chore: fix F841 errors reported by flake8John L. Villalovos2021-04-181-1/+1
| | | | | | | | | | | | Local variable name is assigned to but never used https://www.flake8rules.com/rules/F841.html
| * chore: fix F401 errors reported by flake8John L. Villalovos2021-04-1816-87/+83
| | | | | | | | | | | | F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
* | fix: argument type was not a tuple as expectedJohn L. Villalovos2021-04-181-1/+1
| | | | | | | | | | | | While adding type-hints mypy flagged this as an issue. The third argument to register_custom_action is supposed to be a tuple. It was being passed as a string rather than a tuple of strings.
* | chore: fix typo in mr eventsfeat/resource-state-eventsNejc Habjan2021-04-181-4/+2
| |
* | feat(objects): add support for resource state events APINejc Habjan2021-04-183-0/+30
|/
* Merge pull request #1366 from JohnVillalovos/jlvillal/create_attrsNejc Habjan2021-04-1742-270/+328
|\ | | | | chore: have _create_attrs & _update_attrs be a namedtuple
| * chore: have _create_attrs & _update_attrs be a namedtupleJohn L. Villalovos2021-04-1742-270/+328
| | | | | | | | | | | | Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple.
* | Merge pull request #1363 from python-gitlab/feat/all-audit-eventsMax Wittig2021-03-245-18/+61
|\ \ | | | | | | Feat: cover all audit events
| * | feat(objects): add support for group audit events APIfeat/all-audit-eventsNejc Habjan2021-03-073-5/+47
| | |
| * | chore: import audit events in objectsNejc Habjan2021-03-071-0/+1
| | |
| * | fix(objects): add single get endpoint for instance audit eventsNejc Habjan2021-03-071-1/+1
| | |
| * | refactor(objects): move instance audit events where they belongNejc Habjan2021-03-072-13/+13
| | |
* | | Merge pull request #1373 from JacobHenner/jacobhenner/add-package_filesNejc Habjan2021-03-141-2/+13
|\ \ \ | |_|/ |/| | feat: add support for Project Package Files
| * | feat: add ProjectPackageFileJacob Henner2021-03-101-2/+13
| | | | | | | | | | | | | | | | | | | | | Add ProjectPackageFile and the ability to list project package package_files. Fixes #1372
* | | chore: add _create_attrs & _update_attrs to RESTManagerJohn L. Villalovos2021-03-101-23/+12
|/ / | | | | | | | | | | | | Add the attributes: _create_attrs and _update_attrs to the RESTManager class. This is so that we stop using getattr() if we don't need to. This also helps with type-hints being available for these attributes.
* | fix: checking if RESTManager._from_parent_attrs is setJohn L. Villalovos2021-03-071-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | Prior to commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 RESTManager._from_parent_attrs did not exist unless it was explicitly set. But commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 set it to a default value of {}. So the checks using hasattr() were no longer valid. Update the checks to check if RESTManager._from_parent_attrs has a value.
* | chore: make _types always present in RESTManagerJohn L. Villalovos2021-03-071-3/+2
|/ | | | | | | | | | We now create _types = {} in RESTManager class. By making _types always present in RESTManager it makes the code simpler. We no longer have to do: types = getattr(self, "_types", {}) And the type checker now understands the type.
* chore: del 'import *' in gitlab/v4/objects/project_access_tokens.pyJohn L. Villalovos2021-03-011-2/+2
| | | | | Remove usage of 'import *' in gitlab/v4/objects/project_access_tokens.py.
* chore(api): move repository endpoints into separate modulechore/split-repository-methodsNejc Habjan2021-02-282-197/+208
|
* Merge pull request #1333 from python-gitlab/feat/user-follow-apiNejc Habjan2021-02-281-0/+50
|\ | | | | feat(users): add follow/unfollow API
| * feat(users): add follow/unfollow APIfeat/user-follow-apiMax Wittig2021-02-271-0/+50
| |
* | fix: remove duplicate class definitions in v4/objects/users.pyJohn L. Villalovos2021-02-251-12/+0
| | | | | | | | | | The classes UserStatus and UserStatusManager were each declared twice. Remove the duplicate declarations.
* | Merge pull request #1319 from JohnVillalovos/jlvillal/import_starNejc Habjan2021-02-2557-114/+244
|\ \ | |/ |/| chore: remove usage of 'from ... import *'
| * chore: remove usage of 'from ... import *'John L. Villalovos2021-02-2357-114/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gitlab/v4/objects/*.py remove usage of: * from gitlab.base import * * from gitlab.mixins import * Change them to: * from gitlab.base import CLASS_NAME * from gitlab.mixins import CLASS_NAME Programmatically update code to explicitly import needed classes only. After the change the output of: $ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin' Is empty. Before many messages about unable to determine if it was a valid name.