| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
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
|
| |
|
|\
| |
| | |
feat(users): add approve and reject methods to User
|
| |
| |
| |
| |
| |
| | |
As requested in #1604.
Co-authored-by: John Villalovos <john@sodarock.com>
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
This allows accessing the elements by value, i.e.:
import gitlab.const
gitlab.const.AccessLevel(20)
|
|
|
|
|
|
|
|
| |
- 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(cli): project-merge-request-approval-rule
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
| |
Make the parser name more user friendly by renaming from generic
"object" to "GitLab resource"
|
|\
| |
| | |
chore: enable more pylint checks
|
| |
| |
| |
| |
| | |
Enable the pylint check "redefined-outer-name" and fix the errors
detected.
|
| |
| |
| |
| | |
Enable the pylint check "no-self-use" and fix the errors detected.
|
| |
| |
| |
| | |
Enable the pylint check "no-else-return" and fix the errors detected.
|
| |
| |
| |
| |
| | |
Enable the pylint check: "attribute-defined-outside-init" and fix
errors detected.
|
| |
| |
| |
| | |
Enable the pylint check "raise-missing-from" and fix errors detected.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Enable the pylint checks:
* unnecessary-pass
* unspecified-encoding
Update code to resolve errors found
|
|/
|
|
|
| |
Rename the variables `whaction` and `action` to `resource_action` to
improve code-readability.
|
|\
| |
| | |
chore: rename `what` to `gitlab_resource`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| | |
chore: rename `__call__()` to `run()` in GitlabCLI
|
| |
| |
| |
| | |
Less confusing to have it be a normal method.
|
|/
|
|
|
| |
Enable the 'consider-using-sys-exit' pylint check and fix errors
raised.
|
|
|
|
|
| |
We previously converted all string formatting to use f-strings. Enable
pylint check to enforce this.
|
| |
|
|
|
|
|
| |
Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys
from the args dict so this has been trying to access the wrong attribute.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Replace usage with f-string
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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`
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
problem (#2013)
fix(cli): change default `allow_abbrev` value to fix argument collision
|
|
|
|
|
|
|
|
|
|
| |
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
|