| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |/ |
|
| |
|
|
| |
This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
|
| | |
|
| |\
| |
| | |
fix: support RateLimit-Reset header
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some endpoints are not returning the `Retry-After` header when
rate-limiting occurrs. In those cases use the `RateLimit-Reset` [1]
header, if available.
Closes: #1889
[1] https://docs.gitlab.com/ee/user/admin_area/settings/user_and_ip_rate_limits.html#response-headers
|
| |\ \
| | |
| | | |
chore(deps): update black to v22 (major)
|
| | | | |
|
| |/ / |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Create a custom `warnings.warn` wrapper that will walk the stack trace
to find the first frame outside of the `gitlab/` path to print the
warning against. This will make it easier for users to find where in
their code the error is generated from
|
| |
|
|
|
|
|
| |
There are occasions where a GitLab `list()` call does not return the
`x-per-page` header. For example the listing of custom attributes.
Update the type-hints to reflect that.
|
| | |
|
| |
|
|
|
|
|
|
| |
The non-keyword arguments were a tiny bit confusing as the destination was
first and the source was second.
Change the order and require key-word only arguments to ensure we
don't silently break anyone.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The usage of deleting was incorrect according to the current API.
Remove custom `delete()` method as not needed.
Add tests to show it works with labels needing to be encoded.
Also enable the test_group_labels() test function. Previously it was
disabled.
Add ability to do a `get()` for group labels.
Closes: #1867
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a new ArrayAttribute class. This is to indicate types which are
sent to the GitLab server as arrays
https://docs.gitlab.com/ee/api/#array
At this stage it is identical to the CommaSeparatedListAttribute class
but will be used later to support the array types sent to GitLab.
This is the second step in a series of steps of our goal to add full
support for the GitLab API data types[1]:
* array
* hash
* array of hashes
Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
Related: #1698
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This name more accurately describes what the type is. Also this is the
first step in a series of steps of our goal to add full support for
the GitLab API data types[1]:
* array
* hash
* array of hashes
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
|
| | |
|
| | |
|
| |\
| |
| | |
chore: rename `gitlab/__version__.py` to `gitlab/_version.py`
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is confusing to have a `gitlab/__version__.py` because we also
create a variable `gitlab.__version__` which can conflict with
`gitlab/__version__.py`.
For example in `gitlab/const.py` we have to know that
`gitlab.__version__` is a module and not the variable due to the
ordering of imports. But in most other usage `gitlab.__version__` is a
version string.
To reduce confusion make the name of the version file
`gitlab/_version.py`.
|
| |/
|
|
|
|
| |
Create return type-hints for `RESTObject.get_id()` and
`RESTObject.encoded_id`. Previously was saying they return Any. Be
more precise in saying they can return either: None, str, or int.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Updated a few remaining usages of `self.id` to use `self.encoded_id`
as for the most part we shouldn't be using `self.id`
There are now only a few (4 lines of code) remaining uses of
`self.id`, most of which seem that they should stay that way.
|
| |\
| |
| | |
chore(objects): use `self.encoded_id` where could be a string
|
| | |
| |
| |
| |
| | |
Updated a few remaining usages of `self.id` to use `self.encoded_id`
where it could be a string value.
|
| | |
| |
| | |
Co-authored-by: John Villalovos <john@sodarock.com>
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
Return the new object data when calling `SaveMixin.save()`.
Also remove check for `None` value when calling
`self.manager.update()` as that method only returns a dictionary.
Closes: #1081
|
| |\
| |
| | |
fix: use url-encoded ID in all paths
|
| | |
| |
| |
| |
| |
| | |
utils.EncodedId() has basically the same functionalityy of using
utils._url_encode(). So remove utils._url_encode() as we don't need
it.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add EncodedId string class. This class returns a URL-encoded string
but ensures it will only URL-encode it once even if recursively
called.
Also added some functional tests of 'lazy' objects to make sure they
work.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure all usage of the ID in the URL path is encoded. Normally it
isn't an issue as most IDs are integers or strings which don't contain
a slash ('/'). But when the ID is a string with a slash character it
will break things.
Add a test case that shows this fixes wikis issue with subpages which
use the slash character.
Closes: #1079
|
| |\ \
| | |
| | | |
fix: members: use new *All objects for *AllManager managers
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Change it so that:
GroupMemberAllManager uses GroupMemberAll object
ProjectMemberAllManager uses ProjectMemberAll object
Create GroupMemberAll and ProjectMemberAll objects that do not support
any Mixin type methods. Previously we were using GroupMember and
ProjectMember which support the `save()` and `delete()` methods but
those methods will not work with objects retrieved using the
`/members/all/` API calls.
`list()` API calls: [1]
GET /groups/:id/members/all
GET /projects/:id/members/all
`get()` API calls: [2]
GET /groups/:id/members/all/:user_id
GET /projects/:id/members/all/:user_id
Closes: #1825
Closes: #848
[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members
[2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
|
| | |/
|/| |
|