summaryrefslogtreecommitdiff
path: root/gitlab
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()
* | Merge pull request #1474 from JohnVillalovos/jlvillal/mv_unit_testsNejc Habjan2021-05-2955-5852/+0
|\ \ | | | | | | chore: move 'gitlab/tests/' dir to 'tests/unit/'
| * | chore: move 'gitlab/tests/' dir to 'tests/unit/'John L. Villalovos2021-05-2655-5852/+0
| |/ | | | | | | | | Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the tests located under the 'tests/' directory.
* | chore: correct a type-hintJohn L. Villalovos2021-05-281-1/+2
|/
* 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-253-1/+92
|
* chore: fix import ordering using isortJohn L. Villalovos2021-05-2591-138/+80
| | | | | | Fix the import ordering using isort. https://pycqa.github.io/isort/
* test(cli): add more real class scenariosNejc Habjan2021-05-151-0/+6
|
* fix(cli): fix parsing CLI objects to classnamesNejc Habjan2021-05-153-19/+48
|
* feat: add feature to get inherited member for project/groupOleksii Shkurupii2021-05-074-55/+72
|
* 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
| |
* | Merge pull request #1444 from python-gitlab/fix/return-retry-cancel-outputMax Wittig2021-05-024-4/+196
|\ \ | | | | | | fix(objects): return server data in cancel/retry methods
| * | fix(objects): return server data in cancel/retry methodsNejc Habjan2021-05-024-4/+196
| | |
* | | Merge pull request #1409 from JohnVillalovos/jlvillal/untyped_defsNejc Habjan2021-05-017-53/+75
|\ \ \ | |/ / |/| | chore: mypy: Disallow untyped definitions
| * | chore: mypy: Disallow untyped definitionsJohn L. Villalovos2021-04-277-53/+75
| |/ | | | | | | | | | | | | | | | | Be more strict and don't allow untyped definitions on the files we check. Also this adds type-hints for two of the decorators so that now functions/methods decorated by them will have their types be revealed correctly.
* | 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.
* | feat: indicate that we are a typed packageJohn L. Villalovos2021-04-271-0/+0
|/ | | | | | | | By adding the file: py.typed it indicates that python-gitlab is a typed package and contains type-hints. https://www.python.org/dev/peps/pep-0561/
* 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-276-5/+127
|\ | | | | fix: add a check to ensure the MRO is correct
| * chore: remove commented-out printNejc Habjan2021-04-271-1/+0
| |
| * fix: add a check to ensure the MRO is correctJohn L. Villalovos2021-04-246-5/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #1415 from JohnVillalovos/jlvillal/list_attribute_intNejc Habjan2021-04-272-1/+6
|\ \ | | | | | | feat: add support for lists of integers to ListAttribute
| * | feat: add support for lists of integers to ListAttributeJohn L. Villalovos2021-04-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously ListAttribute only support lists of integers. Now be more flexible and support lists of items which can be coerced into strings, for example integers. This will help us fix issue #1407 by using ListAttribute for the 'iids' field.
* | | Merge pull request #1412 from JohnVillalovos/jlvillal/optional_get_attrsNejc Habjan2021-04-262-7/+6
|\ \ \ | | | | | | | | chore: make Get.*Mixin._optional_get_attrs always present
| * | | chore: make Get.*Mixin._optional_get_attrs always presentJohn L. Villalovos2021-04-242-7/+7
| | |/ | |/| | | | | | | | | | | | | | | | | | | 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-263-2/+50
| |/ |/|
* | Merge pull request #1408 from python-gitlab/chore/bump-to-2-7-0v2.7.0Nejc Habjan2021-04-251-1/+1
|\ \ | | | | | | chore: bump version to 2.7.0
| * | chore: bump version to 2.7.0chore/bump-to-2-7-0Max Wittig2021-04-231-1/+1
| |/
* | Merge pull request #1411 from JohnVillalovos/jlvillal/list_filtersMax Wittig2021-04-252-7/+6
|\ \ | | | | | | chore: make ListMixin._list_filters always present
| * | chore: make ListMixin._list_filters always presentJohn L. Villalovos2021-04-242-7/+6
| |/ | | | | | | | | | | | | | | 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-252-1/+2
|\ \ | | | | | | chore: make RESTObject._short_print_attrs always present
| * | chore: make RESTObject._short_print_attrs always presentJohn L. Villalovos2021-04-242-1/+2
| |/ | | | | | | | | | | | | | | 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 #1392 from bbatliner/patch-1Max Wittig2021-04-231-10/+18
|\ | | | | Improvements to HTTP requests
| * fix: only append kwargs as query parametersBrendan Batliner2021-04-071-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some arguments to `http_request` were being read from kwargs, but kwargs is where this function creates query parameters from, by default. In the absence of a `query_parameters` param, the function would construct URLs with query parameters such as `retry_transient_errors=True` despite those parameters having no meaning to the API to which the request was sent. This change names those arguments that are specific to `http_request` so that they do not end up as query parameters read from kwargs.
| * fix: only add query_parameters to GitlabList onceBrendan Batliner2021-04-071-0/+3
| | | | | | | | Fixes #1386
* | 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-2331-146/+135
|\ \ \ | | | | | | | | 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-184-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-1823-101/+91
| | | | | | | | | | | | | | | | | | | | | | | | F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
| * | | chore: fix E711 error reported by flake8John L. Villalovos2021-04-182-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | E711: Comparison to none should be 'if cond is none:' https://www.flake8rules.com/rules/E711.html
| * | | chore: fix E712 errors reported by flake8John L. Villalovos2021-04-184-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | E712: Comparison to true should be 'if cond is true:' or 'if cond:' https://www.flake8rules.com/rules/E712.html
| * | | chore: fix E741/E742 errors reported by flake8John L. Villalovos2021-04-183-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes to resolve errors for: https://www.flake8rules.com/rules/E741.html Do not use variables named 'I', 'O', or 'l' (E741) https://www.flake8rules.com/rules/E742.html Do not define classes named 'I', 'O', or 'l' (E742)
* | | | fix: update user's bool data and avatarDylann Cordel2021-04-221-0/+6
| |/ / |/| | | | | | | | | | | | | | | | | If we want to update email, avatar and do not send email confirmation change (`skip_reconfirmation` = True), `MultipartEncoder` will try to encode everything except None and bytes. So it tries to encode bools. Casting bool's values to their stringified int representation fix it.
* | | Merge pull request #1383 from spyoungtech/dirfixNejc Habjan2021-04-212-1/+5
|\ \ \ | | | | | | | | fix(types): prevent __dir__ in RestObject from producing duplicates
| * | | test(object): add test for __dir__ duplicatesSpencer Phillip Young2021-04-211-0/+4
| | | |