summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* feat(cli): do not require config file to run CLIfeat/cli-without-config-fileNejc Habjan2021-12-131-60/+94
| | | | | | | | | | | BREAKING CHANGE: A config file is no longer needed to run the CLI. python-gitlab will default to https://gitlab.com with no authentication if there is no config file provided. python-gitlab will now also only look for configuration in the provided PYTHON_GITLAB_CFG path, instead of merging it with user- and system-wide config files. If the environment variable is defined and the file cannot be opened, python-gitlab will now explicitly fail.
* chore(api): temporarily remove topic delete endpointNejc Habjan2021-12-111-3/+3
| | | | It is not yet available upstream.
* feat(api): add support for Topics APINejc Habjan2021-12-113-0/+30
|
* Merge pull request #1710 from python-gitlab/jlvillal/get_without_idNejc Habjan2021-12-119-9/+85
|\ | | | | chore: add get() methods for GetWithoutIdMixin based classes
| * chore: add get() methods for GetWithoutIdMixin based classesjlvillal/get_without_idJohn L. Villalovos2021-12-089-9/+85
| | | | | | | | | | | | | | Add the get() methods for the GetWithoutIdMixin based classes. Update the tests/meta/test_ensure_type_hints.py tests to check to ensure that the get methods are defined with the correct return type.
* | feat: add delete on package_file objectSimon Hébert-Deschamps2021-12-091-1/+1
|/
* chore: fix pylint error "expression-not-assigned"John L. Villalovos2021-12-071-28/+20
| | | | | | | | Fix pylint error "expression-not-assigned" and remove check from the disabled list. And I personally think it is much more readable now and is less lines of code.
* chore: add initial pylint checkJohn L. Villalovos2021-12-072-13/+21
| | | | | | Initial pylint check is added. A LONG list of disabled checks is also added. In the future we should work through the list and resolve the errors or disable them on a more granular level.
* chore: enable 'warn_redundant_casts' for mypyjlvillal/mypy_strict_two_stepsJohn L. Villalovos2021-12-051-1/+1
| | | | Enable 'warn_redundant_casts'for mypy and resolve one issue.
* Merge pull request #1709 from python-gitlab/docs/sphinx-annotationsNejc Habjan2021-12-0131-386/+379
|\ | | | | docs: only use type annotations for documentation
| * docs: use annotations for return typesdocs/sphinx-annotationsNejc Habjan2021-12-0126-101/+99
| |
| * docs: only use type annotations for documentationNejc Habjan2021-11-2826-287/+282
| |
* | Merge pull request #1702 from python-gitlab/jlvillal/attribute_helpNejc Habjan2021-12-012-5/+35
|\ \ | | | | | | chore: attempt to be more informative for missing attributes
| * | chore: attempt to be more informative for missing attributesjlvillal/attribute_helpJohn L. Villalovos2021-11-302-5/+35
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A commonly reported issue from users on Gitter is that they get an AttributeError for an attribute that should be present. This is often caused due to the fact that they used the `list()` method to retrieve the object and objects retrieved this way often only have a subset of the full data. Add more details in the AttributeError message that explains the situation to users. This will hopefully allow them to resolve the issue. Update the FAQ in the docs to add a section discussing the issue. Closes #1138
* | chore: use constants from gitlab.const moduleJohn L. Villalovos2021-11-301-1/+1
| | | | | | | | | | Have code use constants from the gitlab.const module instead of from the top-level gitlab module.
* | refactor: deprecate accessing constants from top-level namespaceJohn L. Villalovos2021-11-302-1/+52
|/ | | | | | | | | | | | | | We are planning on adding enumerated constants into gitlab/const.py, but if we do that than they will end up being added to the top-level gitlab namespace. We really want to get users to start using `gitlab.const.` to access the constant values in the future. Add the currently defined constants to a list that should not change. Use a module level __getattr__ function so that we can deprecate access to the top-level constants. Add a unit test which verifies we generate a warning when accessing the top-level constants.
* test(cli): improve basic CLI coveragetest/cli-coverageNejc Habjan2021-11-271-3/+3
|
* Merge pull request #1712 from StingRayZA/EpicnotesNejc Habjan2021-11-272-1/+86
|\ | | | | feat(api): add support for epic notes
| * feat(api): add support for epic notesRaimund Hook2021-11-252-1/+86
| | | | | | | | | | | | Added support for notes on group epics Signed-off-by: Raimund Hook <raimund.hook@exfo.com>
* | feat: add support for `projects.groups.list()`jlvillal/project_groupsJohn L. Villalovos2021-11-261-0/+19
|/ | | | | | Add support for `projects.groups.list()` endpoint. Closes #1717
* chore: add type-hints to gitlab/v4/objects/files.pyjlvillal/mypy_epicsJohn L. Villalovos2021-11-211-12/+58
|
* chore: add type-hints to gitlab/v4/objects/labels.pyJohn L. Villalovos2021-11-211-6/+37
|
* chore: add type-hints to gitlab/v4/objects/sidekiq.pyJohn L. Villalovos2021-11-211-4/+12
|
* chore: add type-hints to gitlab/v4/objects/services.pyJohn L. Villalovos2021-11-211-5/+15
|
* chore: add type-hints to gitlab/v4/objects/repositories.pyJohn L. Villalovos2021-11-211-13/+48
|
* chore: add type-hints to gitlab/v4/objects/pipelines.pyJohn L. Villalovos2021-11-211-6/+30
|
* chore: add type-hints to gitlab/v4/objects/milestones.pyJohn L. Villalovos2021-11-211-4/+22
|
* chore: add type-hints to gitlab/v4/objects/jobs.pyJohn L. Villalovos2021-11-211-14/+55
|
* chore: add type-hints to gitlab/v4/objects/issues.pyJohn L. Villalovos2021-11-211-6/+33
|
* chore: add type-hints to gitlab/v4/objects/geo_nodes.pyJohn L. Villalovos2021-11-211-7/+23
|
* chore: add type-hints to gitlab/v4/objects/epics.pyJohn L. Villalovos2021-11-211-2/+16
|
* chore: fix issue with adding type-hints to 'manager' attributeJohn L. Villalovos2021-11-211-0/+4
| | | | | | | | | | | | When attempting to add type-hints to the the 'manager' attribute into a RESTObject derived class it would break things. This was because our auto-manager creation code would automatically add the specified annotated manager to the 'manager' attribute. This breaks things. Now check in our auto-manager creation if our attribute is called 'manager'. If so we ignore it.
* chore: add type-hints to gitlab/v4/objects/merge_request_approvals.pyjlvillal/mypy_merge_request_approvalsJohn L. Villalovos2021-11-161-11/+35
|
* chore: ensure get() methods have correct type-hintsjlvillal/mypy_ensure_type_hintsJohn L. Villalovos2021-11-1520-4/+349
| | | | | | | | Fix classes which don't have correct 'get()' methods for classes derived from GetMixin. Add a unit test which verifies that classes have the correct return type in their 'get()' method.
* 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>