summaryrefslogtreecommitdiff
path: root/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* fix: members: use new *All objects for *AllManager managersjlvillal/all_objectsJohn L. Villalovos2022-01-111-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 [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: broken URL for FAQ about attribute-error-listJohn L. Villalovos2022-01-091-1/+1
| | | | | | | | | | | | | | The URL was missing a 'v' before the version number and thus the page did not exist. Previously the URL for python-gitlab 3.0.0 was: https://python-gitlab.readthedocs.io/en/3.0.0/faq.html#attribute-error-list Which does not exist. Change it to: https://python-gitlab.readthedocs.io/en/v3.0.0/faq.html#attribute-error-list add the 'v' --------------------------^
* feat: add support for Group Access Token APIFabio Huser2022-01-092-0/+19
| | | | See https://docs.gitlab.com/ee/api/group_access_tokens.html
* Merge pull request #1812 from python-gitlab/jlvillal/pprintNejc Habjan2022-01-091-0/+9
|\ | | | | chore: add `pprint()` and `pformat()` methods to RESTObject
| * chore: add `pprint()` and `pformat()` methods to RESTObjectJohn L. Villalovos2022-01-081-0/+9
| | | | | | | | | | This is useful in debugging and testing. As can easily print out the values from an instance in a more human-readable form.
* | fix: remove custom URL encodingJohn L. Villalovos2022-01-086-16/+35
| | | | | | | | | | | | | | | | | | | | We were using `str.replace()` calls to take care of URL encoding issues. Switch them to use our `utils._url_encode()` function which itself uses `urllib.parse.quote()` Closes: #1356
* | fix: remove default arguments for mergerequests.merge()John L. Villalovos2022-01-081-4/+4
| | | | | | | | | | | | | | | | | | | | The arguments `should_remove_source_branch` and `merge_when_pipeline_succeeds` are optional arguments. We should not be setting any default value for them. https://docs.gitlab.com/ee/api/merge_requests.html#accept-mr Closes: #1750
* | fix(cli): url-encode path components of the URLJohn L. Villalovos2022-01-081-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | In the CLI we need to make sure the components put into the path portion of the URL are url-encoded. Otherwise they will be interpreted as part of the path. For example can specify the project ID as a path, but in the URL it must be url-encoded or it doesn't work. Also stop adding the components of the path as query parameters in the URL. Closes: #783 Closes: #1498
* | Merge pull request #1809 from python-gitlab/jlvillal/list_apiNejc Habjan2022-01-081-8/+11
|\ \ | | | | | | fix: change to `http_list` for some ProjectCommit methods
| * | fix: change to `http_list` for some ProjectCommit methodsJohn L. Villalovos2022-01-081-8/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | Fix the type-hints and use `http_list()` for the ProjectCommits methods: - diff() - merge_requests() - refs() This will enable using the pagination support we have for lists. Closes: #1805 Closes: #1231
* | chore: fix missing commajlvillal/missing_commaJohn L. Villalovos2022-01-071-1/+2
|/ | | | | There was a missing comma which meant the strings were concatenated instead of being two separate strings.
* chore: release v3.0.0v3.0.0github-actions2022-01-051-1/+1
|
* feat(cli): allow options from args and environment variablesNejc Habjan2022-01-023-7/+187
| | | | | | | | BREAKING-CHANGE: The gitlab CLI will now accept CLI arguments and environment variables for its global options in addition to configuration file options. This may change behavior for some workflows such as running inside GitLab CI and with certain environment variables configured.
* fix: handle situation where GitLab does not return valuesjlvillal/paginationJohn L. Villalovos2021-12-302-18/+19
| | | | | | | | | | | | | | | | If a query returns more than 10,000 records than the following values are NOT returned: x.total_pages x.total Modify the code to allow no value to be set for these values. If there is not a value returned the functions will now return None. Update unit test so no longer `xfail` https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers Closes #1686
* chore: add and document optional parameters for get MRjlvillal/rebase_in_progressJohn L. Villalovos2021-12-231-0/+5
| | | | | | | Add and document (some of the) optional parameters that can be done for a `project.merge_requests.get()` Closes #1775
* feat(api): support file format for repository archiveMax Ludwig2021-12-211-2/+6
|
* Merge pull request #1766 from python-gitlab/jlvillal/leave_dotNejc Habjan2021-12-212-23/+12
|\ | | | | fix: stop encoding '.' to '%2E'
| * fix: stop encoding '.' to '%2E'jlvillal/leave_dotJohn L. Villalovos2021-12-202-23/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forcing the encoding of '.' to '%2E' causes issues. It also goes against the RFC: https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3 From the RFC: For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers... Closes #1006 Related #1356 Related #1561 BREAKING CHANGE: stop encoding '.' to '%2E'. This could potentially be a breaking change for users who have incorrectly configured GitLab servers which don't handle period '.' characters correctly.
* | chore: remove '# type: ignore' for new mypy versionrenovate/mypy-0.xJohn L. Villalovos2021-12-201-1/+1
|/ | | | | | mypy 0.920 now understands the type of 'http.client.HTTPConnection.debuglevel' so we remove the 'type: ignore' comment to make mypy pass
* feat: add support for `squash_option` in Projectsjlvillal/squash_optionJohn L. Villalovos2021-12-132-0/+3
| | | | | | | There is an optional `squash_option` parameter which can be used when creating Projects and UserProjects. Closes #1744
* 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
|