summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
...
* chore(cli): rename "object" to "GitLab resource"John L. Villalovos2022-06-051-1/+3
| | | | | Make the parser name more user friendly by renaming from generic "object" to "GitLab resource"
* Merge pull request #2051 from python-gitlab/jlvillal/more_more_pylintNejc Habjan2022-06-0511-35/+38
|\ | | | | chore: enable more pylint checks
| * chore: enable pylint check: "redefined-outer-name",John L. Villalovos2022-06-042-6/+5
| | | | | | | | | | Enable the pylint check "redefined-outer-name" and fix the errors detected.
| * chore: enable pylint check: "no-self-use"John L. Villalovos2022-06-043-10/+17
| | | | | | | | Enable the pylint check "no-self-use" and fix the errors detected.
| * chore: enable pylint check: "no-else-return"John L. Villalovos2022-06-044-8/+4
| | | | | | | | Enable the pylint check "no-else-return" and fix the errors detected.
| * chore: enable pylint check: "attribute-defined-outside-init"John L. Villalovos2022-06-043-0/+5
| | | | | | | | | | Enable the pylint check: "attribute-defined-outside-init" and fix errors detected.
| * chore: enable pylint check "raise-missing-from"John L. Villalovos2022-06-042-4/+6
| | | | | | | | Enable the pylint check "raise-missing-from" and fix errors detected.
| * chore: enable pylint checksJohn L. Villalovos2022-06-042-7/+1
| | | | | | | | | | | | | | | | Enable the pylint checks: * unnecessary-pass * unspecified-encoding Update code to resolve errors found
* | chore: rename `whaction` and `action` to `resource_action` in CLIJohn L. Villalovos2022-06-052-13/+26
|/ | | | | Rename the variables `whaction` and `action` to `resource_action` to improve code-readability.
* Merge pull request #2053 from python-gitlab/jlvillal/resourceNejc Habjan2022-06-042-15/+17
|\ | | | | chore: rename `what` to `gitlab_resource`
| * chore: rename `what` to `gitlab_resource`John L. Villalovos2022-06-032-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | Naming a variable `what` makes it difficult to understand what it is used for. Rename it to `gitlab_resource` as that is what is being stored. The Gitlab documentation talks about them being resources: https://docs.gitlab.com/ee/api/api_resources.html This will improve code readability.
* | Merge pull request #2052 from python-gitlab/jlvillal/cli_minor_cleanNejc Habjan2022-06-041-2/+2
|\ \ | |/ | | chore: rename `__call__()` to `run()` in GitlabCLI
| * chore: rename `__call__()` to `run()` in GitlabCLIJohn L. Villalovos2022-06-031-2/+2
| | | | | | | | Less confusing to have it be a normal method.
* | chore: enable 'consider-using-sys-exit' pylint checkJohn L. Villalovos2022-06-031-2/+2
|/ | | | | Enable the 'consider-using-sys-exit' pylint check and fix errors raised.
* chore: require f-stringsJohn L. Villalovos2022-06-011-3/+3
| | | | | We previously converted all string formatting to use f-strings. Enable pylint check to enforce this.
* chore(cli): ignore coverage on exceptions triggering cli.dieNejc Habjan2022-06-011-7/+7
|
* fix(cli): fix project export download for CLINejc Habjan2022-06-011-1/+1
| | | | | Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys from the args dict so this has been trying to access the wrong attribute.
* chore: move `utils._validate_attrs` inside `types.RequiredOptional`John L. Villalovos2022-05-316-39/+37
| | | | | | Move the `validate_attrs` function to be inside the `RequiredOptional` class. It makes sense for it to be part of the class as it is working on data related to the class.
* chore: remove use of '%' string formatter in `gitlab/utils.py`John L. Villalovos2022-05-311-2/+2
| | | | Replace usage with f-string
* chore: have `EncodedId` creation always return `EncodedId`John L. Villalovos2022-05-311-7/+5
| | | | | | | | There is no reason to return an `int` as we can always return a `str` version of the `int` Change `EncodedId` to always return an `EncodedId`. This removes the need to have `mypy` ignore the error raised.
* feat: support mutually exclusive attributes and consolidate validation to ↵Walter Rowe2022-05-317-36/+48
| | | | | | | | | | | | | | | fix board lists (#2037) add exclusive tuple to RequiredOptional data class to support for mutually exclusive attributes consolidate _check_missing_create_attrs and _check_missing_update_attrs from mixins.py into _validate_attrs in utils.py change _create_attrs in board list manager classes from required=('label_ld',) to exclusive=('label_id','asignee_id','milestone_id') closes https://github.com/python-gitlab/python-gitlab/issues/1897
* chore: move `RequiredOptional` to the `gitlab.types` moduleJohn L. Villalovos2022-05-3145-55/+97
| | | | | | By having `RequiredOptional` in the `gitlab.base` module it makes it difficult with circular imports. Move it to the `gitlab.types` module which has no dependencies on any other gitlab module.
* chore: update type-hints return signature for GetWithoutIdMixin methodsJohn L. Villalovos2022-05-3011-63/+47
| | | | | | | Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where `get()` in a `GetWithoutIdMixin` based class could return `None` Update the type-hints to no longer return `Optional` AKA `None`
* chore: correct ModuleNotFoundError() argumentsJohn L. Villalovos2022-05-292-3/+3
| | | | | | | | | | | Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had used the `name` argument for `ModuleNotFoundError()`. This basically is the equivalent of not passing any message to `ModuleNotFoundError()`. So when the exception was raised it wasn't very helpful. Correct that and add a unit-test that shows we get the message we expect.
* chore(mixins): remove None check as http_get always returns valueNejc Habjan2022-05-291-2/+0
|
* test(gitlab): increase unit test coverageNejc Habjan2022-05-292-4/+8
|
* feat(client): introduce `iterator=True` and deprecate `as_list=False` in ↵John L. Villalovos2022-05-298-36/+39
| | | | | | | | | | | `list()` `as_list=False` is confusing as it doesn't explain what is being returned. Replace it with `iterator=True` which more clearly explains to the user that an iterator/generator will be returned. This maintains backward compatibility with `as_list` but does issue a DeprecationWarning if `as_list` is set.
* refactor(mixins): extract custom type transforms into utilsNejc Habjan2022-05-292-45/+40
|
* chore: release v3.5.0v3.5.0github-actions2022-05-281-1/+1
|
* feat(objects): support get project storage endpointNejc Habjan2022-05-271-0/+19
|
* fix(cli): changed default `allow_abbrev` value to fix arguments collision ↵John Villalovos2022-05-091-1/+3
| | | | | problem (#2013) fix(cli): change default `allow_abbrev` value to fix argument collision
* fix: duplicate subparsers being added to argparseJohn L. Villalovos2022-05-091-7/+18
| | | | | | | | | | Python 3.11 added an additional check in the argparse libary which detected duplicate subparsers being added. We had duplicate subparsers being added. Make sure we don't add duplicate subparsers. Closes: #2015
* feat: display human-readable attribute in `repr()` if presentNejc Habjan2022-05-0817-51/+54
|
* Merge pull request #1996 from Psycojoker/project-name-in-reprNejc Habjan2022-05-071-0/+10
|\ | | | | feat(ux): display project.name_with_namespace on project repr
| * feat(ux): display project.name_with_namespace on project reprLaurent Peuch2022-04-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change the repr from: $ gitlab.projects.get(id=some_id) <Project id:some_id> To: $ gitlab.projects.get(id=some_id) <Project id:some_id name_with_namespace:"group_name / project_name"> This is especially useful when working on random projects or listing of projects since users generally don't remember projects ids.
* | docs: add missing Admin access const valueNazia Povey2022-05-071-0/+1
|/ | | | | As shown here, Admin access is set to 60: https://docs.gitlab.com/ee/api/protected_branches.html#protected-branches-api
* chore: release v3.4.0v3.4.0github-actions2022-04-281-1/+1
|
* Merge pull request #1965 from python-gitlab/fix/redundant-args-apiMax Wittig2022-04-141-5/+7
|\ | | | | fix: avoid passing redundant arguments to API
| * fix: avoid passing redundant arguments to APINejc Habjan2022-04-051-5/+7
| |
* | Merge pull request #1974 from ↵Nejc Habjan2022-04-141-1/+1
|\ \ | | | | | | | | | | | | Sineaggi/add-chunked-to-list-of-retryable-exceptions Add ChunkedEncodingError to list of retryable exceptions
| * | fix: add ChunkedEncodingError to list of retryable exceptionsClayton Walker2022-04-131-1/+1
| | |
* | | Merge pull request #1963 from python-gitlab/feat/deploy-token-getMax Wittig2022-04-131-3/+21
|\ \ \ | | | | | | | | feat(objects): support getting project/group deploy tokens by id
| * | | feat(objects): support getting project/group deploy tokens by idNejc Habjan2022-04-041-3/+21
| | | |
* | | | Merge pull request #1962 from python-gitlab/feat/user-ssh-keyMax Wittig2022-04-131-1/+4
|\ \ \ \ | | | | | | | | | | feat(user): support getting user SSH key by id
| * | | | feat(user): support getting user SSH key by idNejc Habjan2022-04-011-1/+4
| |/ / /
* | | | feat: emit a warning when using a `list()` method returns maxJohn L. Villalovos2022-04-121-8/+54
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A common cause of issues filed and questions raised is that a user will call a `list()` method and only get 20 items. As this is the default maximum of items that will be returned from a `list()` method. To help with this we now emit a warning when the result from a `list()` method is greater-than or equal to 20 (or the specified `per_page` value) and the user is not using either `all=True`, `all=False`, `as_list=False`, or `page=X`.
* | | Merge pull request #1964 from python-gitlab/fix/missing-commit-list-filtersMax Wittig2022-04-061-0/+10
|\ \ \ | |_|/ |/| | fix(cli): add missing filters for project commit list
| * | fix(cli): add missing filters for project commit listNejc Habjan2022-04-041-0/+10
| |/
* | chore(client): remove duplicate codeNejc Habjan2022-04-041-3/+0
| |
* | fix: add 52x range to retry transient failures and testsClayton Walker2022-04-041-3/+6
| |