summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* chore: add type-hints to gitlab/v4/objects/snippets.pyjlvillal/mypy_snippetsJohn L. Villalovos2021-11-141-4/+32
|
* refactor: use new-style formatting for named placeholdersNejc Habjan2021-11-0850-163/+147
|
* chore: enforce type-hints on most files in gitlab/v4/objects/jlvillal/mypy_small_files_1John L. Villalovos2021-11-0821-34/+219
| | | | | | | * Add type-hints to some of the files in gitlab/v4/objects/ * Fix issues detected when adding type-hints * Changed mypy exclusion to explicitly list the 13 files that have not yet had type-hints added.
* chore: add type hints for gitlab/v4/objects/commits.pyjlvillal/mypy_commitsJohn L. Villalovos2021-11-071-9/+24
|
* chore: add type-hints to multiple files in gitlab/v4/objects/John L. Villalovos2021-11-076-4/+38
| | | | | | | | | | | | | | | | | | | | Add and/or check type-hints for the following files gitlab.v4.objects.access_requests gitlab.v4.objects.applications gitlab.v4.objects.broadcast_messages gitlab.v4.objects.deployments gitlab.v4.objects.keys gitlab.v4.objects.merge_trains gitlab.v4.objects.namespaces gitlab.v4.objects.pages gitlab.v4.objects.personal_access_tokens gitlab.v4.objects.project_access_tokens gitlab.v4.objects.tags gitlab.v4.objects.templates gitlab.v4.objects.triggers Add a 'get' method with the correct type for Managers derived from GetMixin.
* chore: add type-hints to gitlab/v4/objects/groups.pyJohn L. Villalovos2021-11-071-11/+44
| | | | | | | * Add type-hints to gitlab/v4/objects/groups.py * Have share() function update object attributes. * Add 'get()' method so that type-checkers will understand that getting a group is of type Group.
* chore: add type-hints to gitlab/v4/objects/merge_requests.pyjlvillal/mypy_merge_requestsJohn L. Villalovos2021-11-061-17/+50
| | | | | | | | | | * Add type-hints to gitlab/v4/objects/merge_requests.py * Add return value to cancel_merge_when_pipeline_succeeds() function as GitLab docs show it returns a value. * Add return value to approve() function as GitLab docs show it returns a value. * Add 'get()' method so that type-checkers will understand that getting a project merge request is of type ProjectMergeRequest.
* docs: add links to the GitLab API docsjlvillal/merge_requests_apiJohn L. Villalovos2021-11-051-0/+9
| | | | | Add links to the GitLab API docs for merge_requests.py as it contains code which spans two different API documentation pages.
* refactor: use f-strings for string formattingNejc Habjan2021-11-0531-194/+184
|
* Merge pull request #1646 from JacobHenner/add-merge-trainsNejc Habjan2021-11-013-0/+21
|\ | | | | feat(api): add merge trains
| * feat(api): add merge trainsJacob Henner2021-10-203-0/+21
| | | | | | | | Add support for merge trains
* | feat(api): add project milestone promotionRaimund Hook2021-10-271-2/+3
| | | | | | | | | | | | Adds promotion to Project Milestones Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* | Merge pull request #1641 from JacobHenner/add-merge-request-approval-stateNejc Habjan2021-10-202-0/+14
|\ \ | | | | | | feat(api): add merge request approval state
| * | feat(api): add merge request approval stateJacob Henner2021-10-192-0/+14
| |/ | | | | | | Add support for merge request approval state
* | feat(api): add project label promotionRaimund Hook2021-10-183-1/+55
| | | | | | | | | | | | Adds a mixin that allows the /promote endpoint to be called. Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* | fix(api): delete invalid 'project-runner get' command (#1628)Léo GATELLIER2021-10-171-4/+5
| | | | | | | | | | * fix(api): delete 'group-runner get' and 'group-runner delete' commands Co-authored-by: Léo GATELLIER <git@leogatellier.fr>
* | feat(objects): support delete package files APINejc Habjan2021-10-141-1/+1
| |
* | feat(objects): list starred projects of a userNejc Habjan2021-10-141-0/+34
|/
* chore(objects): remove non-existing trigger ownership methodNejc Habjan2021-10-081-17/+1
|
* Merge pull request #1515 from JohnVillalovos/jlvillal/mypy_v4_obj_usersNejc Habjan2021-10-061-8/+15
|\ | | | | chore: add type-hints to gitlab/v4/objects/users.py
| * chore: add type-hints to gitlab/v4/objects/users.pyJohn L. Villalovos2021-09-071-8/+15
| | | | | | | | Adding type-hints to gitlab/v4/objects/users.py
* | refactor(objects): remove deprecated branch protect methodsNejc Habjan2021-10-061-46/+0
| | | | | | | | | | BREAKING CHANGE: remove deprecated branch protect methods in favor of the more complete protected branches API.
* | fix(api): replace deprecated attribute in delete_in_bulk() (#1536)antti-mikael2021-10-061-11/+13
| | | | | | | | | | BREAKING CHANGE: The deprecated `name_regex` attribute has been removed in favor of `name_regex_delete`. (see https://gitlab.com/gitlab-org/gitlab/-/commit/ce99813cf54)
* | chore: fix type-check issue shown by new requests-typesJohn L. Villalovos2021-10-061-0/+2
| | | | | | | | | | types-requests==2.25.9 changed a type-hint. Update code to handle this change.
* | docs: fix a few typosTim Gates2021-09-198-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are small typos in: - docs/gl_objects/deploy_tokens.rst - gitlab/base.py - gitlab/mixins.py - gitlab/v4/objects/features.py - gitlab/v4/objects/groups.py - gitlab/v4/objects/packages.py - gitlab/v4/objects/projects.py - gitlab/v4/objects/sidekiq.py - gitlab/v4/objects/todos.py Fixes: - Should read `treatment` rather than `reatment`. - Should read `transferred` rather than `transfered`. - Should read `registered` rather than `registred`. - Should read `occurred` rather than `occured`. - Should read `overridden` rather than `overriden`. - Should read `marked` rather than `maked`. - Should read `instantiate` rather than `instanciate`. - Should read `function` rather than `fonction`.
* | feat(objects): support Create and Revoke personal access token APINejc Habjan2021-09-132-4/+21
| |
* | fix(objects): rename confusing `to_project_id` argumentNejc Habjan2021-09-111-3/+3
| | | | | | | | | | | | BREAKING CHANGE: rename confusing `to_project_id` argument in transfer_project to `project_id` (`--project-id` in CLI). This is used for the source project, not for the target namespace.
* | refactor(objects): remove deprecated constants defined in objectsNejc Habjan2021-09-112-15/+3
| | | | | | | | | | BREAKING CHANGE: remove deprecated constants defined in gitlab.v4.objects, and use only gitlab.const module
* | refactor(objects): remove deprecated tag release APINejc Habjan2021-09-081-37/+0
| | | | | | | | | | BREAKING CHANGE: remove deprecated tag release API. This was removed in GitLab 14.0
* | refactor(objects): remove deprecated project.issuesstatisticsNejc Habjan2021-09-081-1/+0
| | | | | | | | | | BREAKING CHANGE: remove deprecated project.issuesstatistics in favor of project.issues_statistics
* | refactor(objects): remove deprecated members.all() methodNejc Habjan2021-09-082-51/+2
| | | | | | | | | | BREAKING CHANGE: remove deprecated members.all() method in favor of members_all.list()
* | refactor(objects): remove deprecated pipelines() methodNejc Habjan2021-09-081-29/+0
| | | | | | | | BREAKING CHANGE: remove deprecated pipelines() methods in favor of pipelines.list()
* | feat: default to gitlab.com if no URL givenNejc Habjan2021-09-082-3/+16
| | | | | | | | | | BREAKING CHANGE: python-gitlab will now default to gitlab.com if no URL is given
* | Merge pull request #1486 from JohnVillalovos/jlvillal/prohibit_redirectionNejc Habjan2021-09-081-19/+25
|\ \ | | | | | | fix!: raise error if there is a 301/302 redirection
| * | fix!: raise error if there is a 301/302 redirectionJohn L. Villalovos2021-09-081-19/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we raised an error if there was a 301, 302 redirect but only from an http URL to an https URL. But we didn't raise an error for any other redirects. This caused two problems: 1. PUT requests that are redirected get changed to GET requests which don't perform the desired action but raise no error. This is because the GET response succeeds but since it wasn't a PUT it doesn't update. See issue: https://github.com/python-gitlab/python-gitlab/issues/1432 2. POST requests that are redirected also got changed to GET requests. They also caused hard to debug tracebacks for the user. See issue: https://github.com/python-gitlab/python-gitlab/issues/1477 Correct this by always raising a RedirectError exception and improve the exception message to let them know what was redirected. Closes: #1485 Closes: #1432 Closes: #1477
* | chore: convert to using type-annotations for managersJohn L. Villalovos2021-09-0819-167/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert our manager usage to be done via type annotations. Now to define a manager to be used in a RESTObject subclass can simply do: class ExampleClass(CRUDMixin, RESTObject): my_manager: MyManager Any type-annotation that annotates it to be of type *Manager (with the exception of RESTManager) will cause the manager to be created on the object.
* | chore: improve type-hinting for managersJohn L. Villalovos2021-09-0720-20/+175
|/ | | | | | | | | | | | | | | The 'managers' are dynamically created. This unfortunately means that we don't have any type-hints for them and so editors which understand type-hints won't know that they are valid attributes. * Add the type-hints for the managers we define. * Add a unit test that makes sure that the type-hints and the '_managers' attribute are kept in sync with each other. * Add unit test that makes sure specified managers in '_managers' have a name ending in 'Managers' to keep with current convention. * Make RESTObject._managers always present with a default value of None. * Fix a type-issue revealed now that mypy knows what the type is
* docs: correct documented return typeJohn L. Villalovos2021-09-021-1/+1
| | | | | | | | repository_archive() returns 'bytes' not 'str' https://docs.gitlab.com/ee/api/repositories.html#get-file-archive Fixes: #1584
* feat: allow global retry_transient_errors setupKarun Japhet2021-08-292-4/+22
| | | | | | `retry_transient_errors` can now be set through the Gitlab instance and global configuration Documentation for API usage has been updated and missing tests have been added.
* chore: release v2.10.1v2.10.1github-actions2021-08-281-1/+1
|
* fix(mixins): improve deprecation warningMax Wittig2021-08-131-1/+1
| | | Also note what should be changed
* chore: release v2.10.0v2.10.0github-actions2021-07-281-1/+1
|
* fix(api): do not require Release name for creationEric Davies2021-07-271-1/+1
| | | | | Stop requiring a `name` attribute for creating a Release, since a release name has not been required since GitLab 12.5.
* feat(api): add merge_ref for merge requestsMatej Focko2021-07-211-0/+15
| | | | | | | Support merge_ref on merge requests that returns commit of attempted merge of the MR. Signed-off-by: Matej Focko <mfocko@redhat.com>
* feat(api): add `name_regex_keep` attribute in `delete_in_bulk()`Antti Tanhuanpää2021-06-291-7/+9
|
* chore: release v2.9.0v2.9.0github-actions2021-06-281-1/+1
|
* Merge pull request #1533 from sugonyak/add-group-hooksNejc Habjan2021-06-272-0/+54
|\ | | | | feat(api): add group hooks
| * feat(api): add group hooksIvan Sugonyak2021-06-262-0/+54
| |
* | feat(release): allow to update releasePierre Paques2021-06-261-3/+6
| | | | | | | | Release API now supports PUT.
* | Merge pull request #1396 from spyoungtech/merge_request_reviewersNejc Habjan2021-06-261-0/+2
|\ \ | |/ |/| feat(api): add support for creating/editing reviewers in project MRs