summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
...
* | fix: also retry HTTP-based transient errorsMitar2022-04-041-11/+25
|/
* feat(api): re-add topic delete endpointNejc Habjan2022-04-011-3/+3
| | | | This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
* chore: release v3.3.0v3.3.0github-actions2022-03-281-1/+1
|
* Merge pull request #1895 from python-gitlab/jlvillal/rate-limitNejc Habjan2022-03-101-0/+4
|\ | | | | fix: support RateLimit-Reset header
| * fix: support RateLimit-Reset headerJohn L. Villalovos2022-02-161-0/+4
| | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #1917 from python-gitlab/renovate/major-blackNejc Habjan2022-03-101-1/+1
|\ \ | | | | | | chore(deps): update black to v22 (major)
| * | style: reformat for black v22Nejc Habjan2022-03-101-1/+1
| | |
* | | feat(object): add pipeline test report summary supportkinbald2022-03-071-0/+20
|/ /
* | chore: release v3.2.0v3.2.0github-actions2022-02-281-1/+1
|/
* feat(merge_request_approvals): add support for deleting MR approval rulesNejc Habjan2022-02-131-2/+2
|
* feat(artifacts): add support for project artifacts delete APINejc Habjan2022-02-101-0/+17
|
* feat(mixins): allow deleting resources without IDsNejc Habjan2022-02-101-1/+4
|
* chore: create a custom `warnings.warn` wrapperJohn L. Villalovos2022-02-064-20/+63
| | | | | | | 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
* chore: correct type-hints for per_page attrbuteJohn L. Villalovos2022-02-052-5/+3
| | | | | | | 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.
* fix(services): use slug for id_attr instead of custom methodsNejc Habjan2022-02-031-49/+3
|
* chore: require kwargs for `utils.copy_dict()`John L. Villalovos2022-02-032-4/+8
| | | | | | | | 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.
* style(objects): add spacing to docstringsNejc Habjan2022-02-011-1/+10
|
* feat(objects): add a complete artifacts managerNejc Habjan2022-02-013-81/+133
|
* fix: remove custom `delete` method for labelsJohn L. Villalovos2022-02-011-41/+7
| | | | | | | | | | | | | | 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
* chore: create new ArrayAttribute classJohn L. Villalovos2022-01-309-37/+38
| | | | | | | | | | | | | | | | | | | | | 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
* chore: release v3.1.1v3.1.1github-actions2022-01-281-1/+1
|
* fix(cli): make 'per_page' and 'page' type explicitThomas de Grenier de Latour2022-01-252-2/+3
|
* fix(cli): make 'timeout' type explicitThomas de Grenier de Latour2022-01-251-0/+1
|
* chore: use dataclass for RequiredOptionalNejc Habjan2022-01-231-2/+4
|
* chore: consistently use open() encoding and file descriptorNejc Habjan2022-01-231-2/+2
|
* chore: don't explicitly pass args to super()Nejc Habjan2022-01-236-10/+10
|
* style: use literals to declare data structuresNejc Habjan2022-01-238-15/+15
|
* chore: remove old-style classesNejc Habjan2022-01-236-12/+12
|
* chore: rename `types.ListAttribute` to `types.CommaSeparatedListAttribute`John L. Villalovos2022-01-2212-36/+51
| | | | | | | | | | | 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
* fix(cli): allow custom methods in managersNejc Habjan2022-01-221-4/+6
|
* fix(objects): make resource access tokens and repos available in CLINejc Habjan2022-01-221-0/+3
|
* Merge pull request #1838 from python-gitlab/jlvillal/version_mvNejc Habjan2022-01-153-2/+2
|\ | | | | chore: rename `gitlab/__version__.py` to `gitlab/_version.py`
| * chore: rename `gitlab/__version__.py` -> `gitlab/_version.py`jlvillal/version_mvJohn L. Villalovos2022-01-153-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | chore: create return type-hints for `get_id()` & `encoded_id`John L. Villalovos2022-01-143-3/+6
|/ | | | | | 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.
* chore: release v3.1.0v3.1.0github-actions2022-01-141-1/+1
|
* chore(groups): use encoded_id for group pathNejc Habjan2022-01-131-1/+1
|
* feat: add support for Groups API method `transfer()`Christian Sattler2022-01-132-1/+27
|
* chore(objects): use `self.encoded_id` where applicableJohn L. Villalovos2022-01-132-7/+7
| | | | | | | | 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.
* Merge pull request #1835 from python-gitlab/jlvillal/id_to_encodedidNejc Habjan2022-01-142-3/+3
|\ | | | | chore(objects): use `self.encoded_id` where could be a string
| * chore(objects): use `self.encoded_id` where could be a stringJohn L. Villalovos2022-01-132-3/+3
| | | | | | | | | | Updated a few remaining usages of `self.id` to use `self.encoded_id` where it could be a string value.
* | chore(projects): fix typing for transfer methodNejc Habjan2022-01-131-1/+1
| | | | | | Co-authored-by: John Villalovos <john@sodarock.com>
* | feat(api): add `project.transfer()` and deprecate `transfer_project()`Nejc Habjan2022-01-131-1/+11
|/
* feat(api): return result from `SaveMixin.save()`kernelport2022-01-131-4/+7
| | | | | | | | | 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
* Merge pull request #1819 from python-gitlab/jlvillal/encoded_idNejc Habjan2022-01-1320-119/+133
|\ | | | | fix: use url-encoded ID in all paths
| * chore: replace usage of utils._url_encode() with utils.EncodedId()jlvillal/encoded_idJohn L. Villalovos2022-01-137-89/+25
| | | | | | | | | | | | utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don't need it.
| * chore: add EncodedId string class to use to hold URL-encoded pathsJohn L. Villalovos2022-01-133-9/+67
| | | | | | | | | | | | | | | | | | 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.
| * fix: use url-encoded ID in all pathsJohn L. Villalovos2022-01-1317-92/+112
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #1827 from python-gitlab/jlvillal/all_objectsNejc Habjan2022-01-131-6/+16
|\ \ | | | | | | fix: members: use new *All objects for *AllManager managers
| * | fix(members): use new *All objects for *AllManager managersJohn L. Villalovos2022-01-131-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | fix(cli): add missing list filters for environmentsNejc Habjan2022-01-131-0/+1
| |/ |/|