summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
...
* feat(cli): add support for global CI lintNejc Habjan2022-07-053-4/+28
|
* chore(ci_lint): add create attributesNejc Habjan2022-07-051-0/+4
|
* refactor(objects): move ci lint to separate fileNejc Habjan2022-07-053-16/+24
|
* feat(objects): add Project CI Lint supportJohn L. Villalovos2022-07-041-0/+23
| | | | | | Add support for validating a project's CI configuration [1] [1] https://docs.gitlab.com/ee/api/lint.html
* feat: add support for group push rulesO'Keefe, Gerard (Gerry)2022-07-042-2/+57
| | | | | | Add the GroupPushRules and GroupPushRulesManager classes. Closes: #1259
* Merge pull request #2114 from python-gitlab/jlvillal/remove_trysNejc Habjan2022-07-041-40/+36
|\ | | | | chore: simplify multi-nested try blocks
| * chore: simplify multi-nested try blocksJohn L. Villalovos2022-06-291-40/+36
| | | | | | | | | | Instead of have a multi-nested series of try blocks. Convert it to a more readable series of `if` statements.
* | fix: ensure path elements are escapedJohn L. Villalovos2022-07-031-4/+6
|/ | | | | | | Ensure the path elements that are passed to the server are escaped. For example a "/" will be changed to "%2F" Closes: #2116
* feat(api): add support for `get` for a MR approval ruleJohn L. Villalovos2022-06-271-4/+10
| | | | | | | | | In GitLab 14.10 they added support to get a single merge request approval rule [1] Add support for it to ProjectMergeRequestApprovalRuleManager [1] https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-a-single-merge-request-level-rule
* chore: release v3.6.0v3.6.0github-actions2022-06-281-1/+1
|
* refactor: do not recommend plain gitlab.const constantsNejc Habjan2022-06-272-6/+10
|
* refactor: avoid possible breaking change in iterator (#2107)John Villalovos2022-06-279-27/+65
| | | | | | | | Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently introduced a possible breaking change as it added a new argument `iterator` and added it in between existing (potentially positional) arguments. This moves the `iterator` argument to the end of the argument list and requires it to be a keyword-only argument.
* test(pylint): enable pylint "unused-argument" checkJohn L. Villalovos2022-06-268-18/+19
| | | | | | | | | | Enable the pylint "unused-argument" check and resolve issues it found. * Quite a few functions were accepting `**kwargs` but not then passing them on through to the next level. Now pass `**kwargs` to next level. * Other functions had no reason to accept `**kwargs`, so remove it * And a few other fixes.
* feat(downloads): allow streaming downloads access to response iterator (#1956)Tom Catshoek2022-06-2610-36/+111
| | | | | | | | | | | | | | | * feat(downloads): allow streaming downloads access to response iterator Allow access to the underlying response iterator when downloading in streaming mode by specifying `iterator=True`. Update type annotations to support this change. * docs(api-docs): add iterator example to artifact download Document the usage of the `iterator=True` option when downloading artifacts * test(packages): add tests for streaming downloads
* refactor: remove no-op id argument in GetWithoutIdMixinNejc Habjan2022-06-2511-87/+51
|
* Merge pull request #2061 from bgamari/patch-1Nejc Habjan2022-06-252-0/+44
|\ | | | | feat(users): add approve and reject methods to User
| * feat(users): add approve and reject methods to UserBen Gamari2022-06-252-0/+44
| | | | | | | | | | | | As requested in #1604. Co-authored-by: John Villalovos <john@sodarock.com>
* | feat(api): support head() method for get and list endpointsNejc Habjan2022-06-252-3/+35
| |
* | feat(api): implement HEAD methodGauvain Pocentek2022-06-251-0/+21
|/
* chore(gitlab): fix implicit re-exports for mpypyNejc Habjan2022-06-233-0/+25
|
* feat(api): convert gitlab.const to EnumsJochen Sprickerhof2022-06-221-29/+80
| | | | | | | This allows accessing the elements by value, i.e.: import gitlab.const gitlab.const.AccessLevel(20)
* feat: Add support for Protected Environmentscalve2022-06-222-1/+34
| | | | | | | | - https://docs.gitlab.com/ee/api/protected_environments.html - https://github.com/python-gitlab/python-gitlab/issues/1130 no write operation are implemented yet as I have no use case right now and am not sure how it should be done
* fix(base): do not fail repr() on lazy objectsNejc Habjan2022-06-201-4/+11
|
* Merge pull request #2066 from python-gitlab/jlvillal/approval_rule_idNejc Habjan2022-06-201-2/+1
|\ | | | | fix(cli): project-merge-request-approval-rule
| * fix(cli): project-merge-request-approval-ruleJohn L. Villalovos2022-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the CLI the command: gitlab project-merge-request-approval-rule list --mr-iid 1 --project-id foo/bar Would raise an exception. This was due to the fact that `_id_attr` and `_repr_attr` were set for keys which are not returned in the response. Add a unit test which shows the `repr` function now works. Before it did not. This is an EE feature so we can't functional test it. Closes: #2065
* | chore: fix issue found with pylint==2.14.3John L. Villalovos2022-06-191-3/+1
| | | | | | | | | | | | | | A new error was reported when running pylint==2.14.3: gitlab/client.py:488:0: W1404: Implicit string concatenation found in call (implicit-str-concat) Fixed this issue.
* | feat(users): add ban and unban methodsAntoine Auger2022-06-132-0/+50
|/
* 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`