| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the
tests located under the 'tests/' directory.
|
| |
|
|
|
|
|
|
| |
Fix the import ordering using isort.
https://pycqa.github.io/isort/
|
| |
|
| |
|
|\
| |
| | |
fix(objects): return server data in cancel/retry methods
|
| | |
|
|/
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
fix: add a check to ensure the MRO is correct
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
feat: add support for lists of integers to ListAttribute
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\
| |
| | |
Fix all issues reported by running: tox -e pep8 and enable pep8 as a linter check
|
| |
| |
| |
| |
| |
| | |
Local variable name is assigned to but never used
https://www.flake8rules.com/rules/F841.html
|
| |
| |
| |
| |
| |
| | |
F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
|
| |
| |
| |
| |
| |
| | |
E711: Comparison to none should be 'if cond is none:'
https://www.flake8rules.com/rules/E711.html
|
| |
| |
| |
| |
| |
| | |
E712: Comparison to true should be 'if cond is true:' or 'if cond:'
https://www.flake8rules.com/rules/E712.html
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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(types): prevent __dir__ in RestObject from producing duplicates
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The function sanitize_parameters() was used when the v3 API was in
use. Since v3 API support has been removed there are no more users of
this function.
|
| |/
|/| |
|
|\ \
| | |
| | | |
feat(config): allow using a credential helper to lookup tokens
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
chore: remove usage of getattr()
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove usage of getattr(self, "_update_uses_post", False)
Instead add it to class and set default value to False.
Add a tests that shows it is set to True for the
ProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
|
|\ \ \
| | | |
| | | | |
chore: have _create_attrs & _update_attrs be a namedtuple
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Convert _create_attrs and _update_attrs to use a NamedTuple
(RequiredOptional) to help with code readability. Update all code to
use the NamedTuple.
|
|\ \ \ \
| |_|/ /
|/| | | |
Feat: cover all audit events
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
feat: add support for Project Package Files
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Add ProjectPackageFile and the ability to list project package
package_files.
Fixes #1372
|
|/ /
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Git refnames are relatively free-form and can contain all sort for
special characters, not just `/` and `#`, see
http://git-scm.com/docs/git-check-ref-format
In particular, Debian's DEP-14 standard for storing packaging in git
repositories mandates the use of the `%` character in tags in some
cases like `debian/2%2.6-21`.
Unfortunately python-gitlab currently only escapes `/` to `%2F` and in
some cases `#` to `%23`. This means that when using the commit API to
retrieve information about the `debian/2%2.6-21` tag only the slash is
escaped before being inserted in the URL path and the `%` is left
untouched, resulting in something like
`/api/v4/projects/123/repository/commits/debian%2F2%2.6-21`. When
urllib3 seees that it detects the invalid `%` escape and then urlencodes
the whole string, resulting in
`/api/v4/projects/123/repository/commits/debian%252F2%252.6-21`, where
the original `/` got escaped twice and produced `%252F`.
To avoid the issue, fully urlencode identifiers and parameters to avoid
the urllib3 auto-escaping in all cases.
Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com>
|
| |
|
|
|
| |
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com>
|
| |
|
| |
|
|\
| |
| | |
feat: add project audit endpoint
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
Move the classes Gitlab and GitlabList from gitlab/__init__.py to the
newly created gitlab/client.py file.
Update one test case that was depending on requests being defined in
gitlab/__init__.py
|
|
|
|
| |
See: https://docs.gitlab.com/ee/api/personal_access_tokens.html
|