NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1090 most downloaded on PyPI
The python wrapper for the GitLab REST and GraphQL APIs.
Last release 1 months ago
28 Jul 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
13 years old
124 releases · first in 2013
stop encoding '.' to '%2E'. This could potentially be a breaking change for users who have incorrectly configured GitLab servers which don't handle pe…
80754a1)ca58008)83dcabf)squash_option in Projects (a246ce8)92a893b)e7559bf)124667b)projects.groups.list() (68ff595)7f4edb5)414009d)f068520)fd73a73)f41b093)6d7c88a)4518046)47a5606)c042ddc)e19314d)8236281)3b1d3a4)cb824a4)702e41d)68a97ce)905781b)c59fbdb)to_project_id argument (ce4bc0d)d56a434)969dccc)ca58008)702e41d)92a893b)414009d)master to main. (545f8ed)9656a16)name_regex attribute has been removed in favor of name_regex_delete. (see https://gitlab.com/gitlab-org/gitlab/-/commit/ce99813cf54) (c59fbdb)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. (ce4bc0d)3f320af)2b8a94a)ca7777e)4d7b848)c4f5ec6)8236281)d56a434)ee6b024)ee66f4a)ee3f865)fed613f)79e785e)b3b0b5f)b7dde0d)e3b5d27)b31bb05)69461f6)7992911)3f423ef)7ea4ddc)90da8ba)acabf63)One column per quarter.
cb824a4)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
d56a434)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:
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
702e41d)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.
Co-authored-by: Léo GATELLIER git@leogatellier.fr
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)
build: Do not include docs in wheel package
(68a97ce)
build: Do not package tests in wheel
(969dccc)
objects: Rename confusing to_project_id argument
(ce4bc0d)
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.
c9318a9)The .env file was not set as a file that should not be ignored by search tools. We want to have
the search tools search any .env files.
bfa3dbe)Add and document (some of the) optional parameters that can be done for a
project.merge_requests.get()
Closes #1775
d27c50a)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.
041091f)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.
b5ec192)Add a unit test for Python 3.11. This will use the latest version of Python 3.11 that is available from https://github.com/actions/python-versions/
At this time it is 3.11.0-alpha.2 but will move forward over time until the final 3.11 release and updates. So 3.11.0, 3.11.1, ... will be matched.
ad5d60c)Add running the unit tests on windows-latest and macos-latest with Python 3.10.
ea97d7a)Add a test case to show that a branch name with a period can be fetched with a get()
Closes: #1715
Add type hints for gitlab/v4/objects/commits.py
(dc096a2)
Add type-hints to gitlab/v4/objects/epics.py
(d4adf8d)
Add type-hints to gitlab/v4/objects/files.py
(0c22bd9)
Add type-hints to gitlab/v4/objects/geo_nodes.py
(13243b7)
Add type-hints to gitlab/v4/objects/groups.py
(94dcb06)
Add type-hints to gitlab/v4/objects/issues.py
(93e39a2)
Add type-hints to gitlab/v4/objects/jobs.py
(e8884f2)
Add type-hints to gitlab/v4/objects/labels.py
(d04e557)
Add type-hints to gitlab/v4/objects/merge_request_approvals.py
(cf3a99a)
Add type-hints to gitlab/v4/objects/merge_requests.py
(f9c0ad9)
Add type-hints to gitlab/v4/objects/milestones.py
(8b6078f)
Add type-hints to gitlab/v4/objects/pipelines.py
(cb3ad6c)
Add type-hints to gitlab/v4/objects/repositories.py
(00d7b20)
Add type-hints to gitlab/v4/objects/services.py
(8da0b75)
Add type-hints to gitlab/v4/objects/sidekiq.py
(a91a303)
Add type-hints to gitlab/v4/objects/snippets.py
(f256d4f)
Add type-hints to gitlab/v4/objects/users.py
(88988e3)
Adding type-hints to gitlab/v4/objects/users.py
8b75a77)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.
Add type-hints to setup.py and check with mypy
(06184da)
Attempt to be more informative for missing attributes
(1839c9e)
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
487b9a8)Add an additional check to attempt to solve the flakiness of the test_merge_request_should_remove_source_branch() test.
77cb7a8)Prior commit 06184daafd5010ba40bb39a0768540b7e98bd171 fixed the type-hints for setup.py. But missed removing 'setup' from the exclude list in pyproject.toml for mypy checks.
Remove 'setup' from the exclude list in pyproject.toml from mypy checks.
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.
9c878a4)The test was checking twice if the same group3 was not in the returned list. Should have been checking for group3 and group4.
Also added a test that only skipped one group and checked that the group was not in the returned list and a non-skipped group was in the list.
94feb8a)The 'test_mro.py' file is not really a unit test but more of a 'meta' check on the validity of the code base.
f40e9b3)Enable 'warn_redundant_casts'for mypy and resolve one issue.
Enable mypy for tests/meta/*
(ba7707f)
Enable subset of the 'mypy --strict' options that work
(a86d049)
Enable the subset of the 'mypy --strict' options that work with no changes to the code.
7828ba2)46773a8)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.
0aa0b27)Ensure reset_gitlab() succeeds by waiting to make sure everything has been deleted as expected. If the timeout is exceeded fail the test.
Not using wait_for_sidekiq as it didn't work. During testing I didn't see any sidekiq processes as
being busy even though not everything was deleted.
c8256a5)Fix functional test failure if config present and configured with token.
Closes: #1791
9a451a8)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.
a90eb23)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.
Fix renovate setup for gitlab docker image
(49af15b)
Fix type-check issue shown by new requests-types
(0ee9aa4)
types-requests==2.25.9 changed a type-hint. Update code to handle this change.
Closes #1764
85b43ae)When building the docs store the created documentation as an artifact so that it can be viewed.
This will create a html-docs.zip file which can be downloaded containing the contents of the
build/sphinx/html/ directory. It can be downloaded, extracted, and then viewed. This can be
useful in reviewing changes to the documentation.
See https://github.com/actions/upload-artifact for more information on how this works.
fd81569)If new new push is done to a pull-request, then cancel any already running github workflow jobs in order to conserve resources.
renovate is not upgrading the black package. There is an open issue[1] about this.
Also change .commitlintrc.json to allow 200 character footer lines in the commit message. Otherwise would be forced to split the URL across multiple lines making it un-clickable :(
Use suggested work-arounds from: https://github.com/renovatebot/renovate/issues/7167#issuecomment-904106838 https://github.com/scop/bash-completion/blob/e7497f6ee8232065ec11450a52a1f244f345e2c6/renovate.json#L34-L38
[1] https://github.com/renovatebot/renovate/issues/7167
c9b5d3b)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.
34a5f22)mypy 0.920 now understands the type of 'http.client.HTTPConnection.debuglevel' so we remove the 'type: ignore' comment to make mypy pass
a2f59f4)Before we were generating 725 tests for the meta/test_ensure_type_hints.py tests. Which isn't a huge concern as it was fairly fast. But when we had a failure we would usually get two failures for each problem as the same test was being run multiple times.
Changed it so that: 1. Don't add tests that are not for *Manager classes 2. Use a set so that we don't have duplicate tests.
After doing that our generated test count in meta/test_ensure_type_hints.py went from 725 to 178 tests.
Additionally removed the parsing of pyproject.toml to generate files to ignore as we have finished
adding type-hints to all files in gitlab/v4/objects/. This also means we no longer use the toml
library so remove installation of types-toml.
To determine the test count the following command was run: $ tox -e py39 -- -k test_ensure_type_hints
e80dcb1)Remove the pytest-console-scripts specific config from the global '[pytest]' config section.
Use the command line option --script-launch-mode=subprocess
Closes #1713
master branch to main
(545f8ed)BREAKING CHANGE: As of python-gitlab 3.0.0, the default branch for development has changed from
master to main.
5f10b3b)If .pre-commit-config.yaml or .github/workflows/pre_commit.yml are updated then run pre-commit.
b67a6ad)https://github.com/pre-commit/mirrors-mypy/blob/master/.pre-commit-hooks.yaml
Sets some default args which seem to be interfering with things. Plus we set all of our args in the
pyproject.toml file.
ac9b595)One of the tests requires Python 3.9 or higher to run. Mark the test to be skipped if running Python less than 3.9.
79321aa)When running with docker-compose on Ubuntu 20.04 I got the error:
$ docker-compose up ERROR: The Compose file './docker-compose.yml' is invalid because:
networks.gitlab-network value Additional properties are not allowed ('name' was unexpected)
Changing the version in the docker-compose.yml file fro '3' to '3.5' resolved the issue.
6b8067e)Have code use constants from the gitlab.const module instead of from the top-level gitlab module.
e3035a7)It is not yet available upstream.
ci: Add workflow to lock old issues
(a7d64fe)
ci: Enable renovate for pre-commit
(1ac4329)
ci: Wait for all coverage jobs before posting comment
(c7fdad4)
deps: Update dependency argcomplete to v2
(c6d7e9a)
deps: Update dependency black to v21
(5bca87c)
deps: Update dependency black to v21.12b0
(ab841b8)
deps: Update dependency flake8 to v4
(79785f0)
deps: Update dependency isort to v5.10.0
(ae62468)
deps: Update dependency isort to v5.10.1
(2012975)
deps: Update dependency mypy to v0.920
(a519b2f)
deps: Update dependency mypy to v0.930
(ccf8190)
deps: Update dependency requests to v2.27.0
(f8c3d00)
deps: Update dependency sphinx to v4
(73745f7)
deps: Update dependency sphinx to v4.3.0
(57283fc)
deps: Update dependency sphinx to v4.3.1
(93a3893)
deps: Update dependency sphinx to v4.3.2
(2210e56)
deps: Update dependency types-pyyaml to v5.4.10
(bdb6cb9)
deps: Update dependency types-pyyaml to v6
(0b53c0a)
deps: Update dependency types-pyyaml to v6.0.1
(a544cd5)
deps: Update dependency types-requests to v2.25.12
(205ad5f)
deps: Update dependency types-requests to v2.25.9
(e3912ca)
deps: Update dependency types-requests to v2.26.0
(7528d84)
deps: Update dependency types-requests to v2.26.2
(ac7e329)
deps: Update dependency types-setuptools to v57.4.3
(ec2c68b)
deps: Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v6
(fb9110b)
deps: Update pre-commit hook psf/black to v21
(b86e819)
deps: Update pre-commit hook pycqa/flake8 to v4
(98a5592)
deps: Update pre-commit hook pycqa/isort to v5.10.1
(8ac4f4a)
deps: Update python docker tag to v3.10
(b3d6d91)
deps: Update typing dependencies
(1f95613)
deps: Update typing dependencies
(8d4c953)
deps: Update typing dependencies
(4170dbe)
deps: Update typing dependencies
(4eb8ec8)
deps: Upgrade gitlab-ce to 14.3.2-ce.0
(5a1678f)
deps: Upgrade mypy pre-commit hook
(e19e4d7)
docs: Link to main, not master
(af0cb4d)
docs: Load autodoc-typehints module
(bd366ab)
docs: Use builtin autodoc hints
(5e9c943)
objects: Remove non-existing trigger ownership method
(8dc7f40)
tests: Apply review suggestions
(381c748)
e3b5d27)Add links to the GitLab API docs for merge_requests.py as it contains code which spans two different API documentation pages.
Consolidate changelogs and remove v3 API docs
(90da8ba)
Correct documentation for updating discussion note
(ee66f4a)
Closes #1777
acabf63)repository_archive() returns 'bytes' not 'str'
https://docs.gitlab.com/ee/api/repositories.html#get-file-archive
Fixes: #1584
7ea4ddc)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.
Fix API delete key example
(b31bb05)
Only use type annotations for documentation
(b7dde0d)
Rename documentation files to match names of code files
(ee3f865)
Rename the merge request related documentation files to match the code files. This will make it easier to find the documentation quickly.
Rename: docs/gl_objects/mrs.rst -> docs/gl_objects/merge_requests.rst docs/gl_objects/mr_approvals.rst -> docs/gl_objects/merge_request_approvals.rst
Switch to Furo and refresh introduction pages
(ee6b024)
Update docs to use gitlab.const for constants
(b3b0b5f)
Update the docs to use gitlab.const to access constants.
See issue #1620
api: Document the update method for project variables
(7992911)
pipelines: Document take_ownership method
(69461f6)
project: Remove redundant encoding parameter
(fed613f)
Add support for projects.groups.list() endpoint.
Closes #1717
squash_option in Projects
(a246ce8)There is an optional squash_option parameter which can be used when creating Projects and
UserProjects.
Closes #1744
3b1d3a4)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.
8236281)BREAKING CHANGE: python-gitlab will now default to gitlab.com if no URL is given
414009d)Python 3.6 is End-of-Life (EOL) as of 2021-12 as stated in https://www.python.org/dev/peps/pep-0494/
By dropping support for Python 3.6 and requiring Python 3.7 or higher it allows python-gitlab to take advantage of new features in Python 3.7, which are documented at: https://docs.python.org/3/whatsnew/3.7.html
Some of these new features that may be useful to python-gitlab are: * PEP 563, postponed evaluation of type annotations. * dataclasses: PEP 557 – Data Classes * importlib.resources * PEP 562, customization of access to module attributes. * PEP 560, core support for typing module and generic types. * PEP 565, improved DeprecationWarning handling
BREAKING CHANGE: As of python-gitlab 3.0.0, Python 3.6 is no longer supported. Python 3.7 or higher is required.
f41b093)Add support for merge request approval state
fd73a73)Add support for merge trains
6d7c88a)Adds a mixin that allows the /promote endpoint to be called.
Signed-off-by: Raimund Hook raimund.hook@exfo.com
f068520)Adds promotion to Project Milestones
Signed-off-by: Raimund Hook raimund.hook@exfo.com
7f4edb5)Added support for notes on group epics
Signed-off-by: Raimund Hook raimund.hook@exfo.com
api: Add support for Topics API
(e7559bf)
api: Support file format for repository archive
(83dcabf)
build: Officially support and test python 3.10
(c042ddc)
cli: Allow options from args and environment variables
(ca58008)
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.
92a893b)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.
80754a1)This is no longer needed as all of the configuration is handled by the CLI and can be passed as arguments.
objects: List starred projects of a user
(47a5606)
objects: Support Create and Revoke personal access token API
(e19314d)
objects: Support delete package files API
(4518046)
c0aa0e1)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.
Use f-strings for string formatting
(7925c90)
Use new-style formatting for named placeholders
(c0d8810)
objects: Remove deprecated branch protect methods
(9656a16)
BREAKING CHANGE: remove deprecated branch protect methods in favor of the more complete protected branches API.
3f320af)BREAKING CHANGE: remove deprecated constants defined in gitlab.v4.objects, and use only gitlab.const module
4d7b848)BREAKING CHANGE: remove deprecated members.all() method in favor of members_all.list()
c4f5ec6)BREAKING CHANGE: remove deprecated pipelines() methods in favor of pipelines.list()
ca7777e)BREAKING CHANGE: remove deprecated project.issuesstatistics in favor of project.issues_statistics
2b8a94a)BREAKING CHANGE: remove deprecated tag release API. This was removed in GitLab 14.0
deps: Upgrade requests to 2.25.0 (see CVE-2021-33503) (`ce995b2`)
deps: Upgrade requests to 2.25.0 (see CVE-2021-33503)
(ce995b2)
mixins: Improve deprecation warning
(57e0187)
Also note what should be changed
Define root dir in mypy, not tox
(7a64e67)
Fix mypy pre-commit hook
(bd50df6)
deps: Group typing requirements with mypy additional_dependencies
(38597e7)
deps: Update codecov/codecov-action action to v2
(44f4fb7)
deps: Update dependency isort to v5.9.3
(ab46e31)
deps: Update dependency types-pyyaml to v5.4.7
(ec8be67)
deps: Update dependency types-pyyaml to v5.4.8
(2ae1dd7)
deps: Update dependency types-requests to v2.25.1
(a2d133a)
deps: Update dependency types-requests to v2.25.2
(4782678)
deps: Update precommit hook pycqa/isort to v5.9.3
(e1954f3)
deps: Update typing dependencies
(34fc210)
deps: Update wagoid/commitlint-github-action action to v4
(ae97196)
5b5a7bc)api: Add merge_ref for merge requests (`1e24ab2`)
98cd03b)Stop requiring a name attribute for creating a Release, since a release name has not been required
since GitLab 12.5.
deps: Update dependency isort to v5.9.2
(d5dcf1c)
deps: Update dependency requests to v2.26.0
(d3ea203)
deps: Update precommit hook pycqa/isort to v5.9.2
(521cddd)
b30b8ac)Signed-off-by: Matej Focko mfocko@redhat.com
project: Add example on getting a single project using name with namespace
(ef16a97)
readme: Move contributing docs to CONTRIBUTING.rst
(edf49a3)
Move the Contributing section of README.rst to CONTRIBUTING.rst, so it is recognized by GitHub and shown when new contributors make pull requests.
api: Add name_regex_keep attribute in delete_in_bulk()
(e49ff3f)
api: Add merge_ref for merge requests
(1e24ab2)
Support merge_ref on merge requests that returns commit of attempted merge of the MR.
Signed-off-by: Matej Focko mfocko@redhat.com
functional: Add mr.merge_ref tests
(a9924f4)
Add test for using merge_ref on non-merged MR - Add test for using merge_ref on MR with conflicts
Signed-off-by: Matej Focko mfocko@redhat.com
tags: Remove deprecated functions (`1b1a827`)
b4c4787)4a7e9b8)3d985ee)954357c)676d1f6)a7371e1)New version of mypy flagged errors for missing types. Install the recommended type-* packages that resolve the issues.
872dd6d)Adding type-hints to gitlab/v4/objects/projects.py
Skip EE test case in functional tests
(953f207)
deps: Update dependency isort to v5.9.1
(0479dba)
deps: Update dependency mypy to v0.902
(19c9736)
deps: Update dependency mypy to v0.910
(02a56f3)
deps: Update dependency types-pyyaml to v0.1.8
(e566767)
deps: Update dependency types-pyyaml to v0.1.9
(1f5b3c0)
deps: Update dependency types-pyyaml to v5
(5c22634)
deps: Update dependency types-requests to v0.1.11
(6ba629c)
deps: Update dependency types-requests to v0.1.12
(f84c2a8)
deps: Update dependency types-requests to v0.1.13
(c3ddae2)
deps: Update dependency types-requests to v2
(a81a926)
deps: Update precommit hook pycqa/isort to v5.9.1
(c57ffe3)
Make Gitlab class usable for intersphinx
(8753add)
release: Add update example
(6254a5f)
tags: Remove deprecated functions
(1b1a827)
api: Add group hooks
(4a7e9b8)
api: Add MR pipeline manager in favor of pipelines() method
(954357c)
api: Add support for creating/editing reviewers in project merge requests
(676d1f6)
api: Remove responsibility for API inconsistencies for MR reviewers
(3d985ee)
release: Allow to update release
(b4c4787)
Release API now supports PUT.
objects: Add support for Group wikis (#1484) (`74f5e62`)
a81525a)74f5e62)79d88bd)fbbc0d4)f731707)1b70580)ee9f96e)fb0b083)e444b39)fdc46ba)e4421ca)115938b)c7bcc25)093db9d)4e690c2)b3d1c26)cb6a3c6)4252070)9fed061)d20ff4f)603a351)45f806c)565d548)565d548)Add a check to ensure the MRO (Method Resolution Order) is correct for classes in gitlab.v4.objects when doing type-checking.
An example of an incorrect definition: class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): ^^^^^^^^^^ This should be at the end.
Correct way would be: class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): Correctly at the end ^^^^^^^^^^
Also fix classes which have the issue.
c7bcc25)Sometimes we have errors where we don't get a dictionary passed to RESTObject.init() method. This breaks things but in confusing ways.
Check in the init() method and raise an exception if it occurs.
cb6a3c6)MR https://github.com/python-gitlab/python-gitlab/pull/1121 changed mr.merge() to use 'query_data'. This appears to have been wrong.
From the Gitlab docs they state it should be sent in a payload body https://docs.gitlab.com/ee/api/README.html#request-payload since mr.merge() is a PUT request.
Request Payload
API Requests can use parameters sent as query strings or as a > payload body. GET requests usually send a query string, while PUT > or POST requests usually send the payload body
Fixes: #1452
Related to: #1120
Ensure kwargs are passed appropriately for ObjectDeleteMixin
(4e690c2)
chore: fix functional project service test
45f806c)Set the 'iids' values as type ListAttribute so it will pass the list as a comma-separated string, instead of a list.
Add a functional test.
Closes: #1407
cli: Add missing list filter for jobs
(b3d1c26)
cli: Fix parsing CLI objects to classnames
(4252070)
objects: Add missing group attributes
(d20ff4f)
objects: Allow lists for filters for in all objects
(603a351)
objects: Return server data in cancel/retry methods
(9fed061)
7d66115)Going to switch to putting parameters from in the query string to having them in the 'data' body section. Add a functional test to make sure that we don't break anything.
https://github.com/python-gitlab/python-gitlab/issues/1120
8be2838)Added a pytest.fixture for merge_request(). Use this fixture in tools/functional/api/test_merge_requests.py
dda646e)https://pycqa.github.io/isort/
cd5993c)Functional test to show that https://github.com/python-gitlab/python-gitlab/issues/1452 is fixed.
Added a functional test to ensure that we can use large commit message (10_000+ bytes) in mr.merge()
Related to: #1452
Add missing linters to pre-commit and pin versions
(85bbd1a)
Add missing optional create parameter for approval_rules
(06a6001)
Add missing optional create parameter ('protected_branch_ids') to the project approvalrules.
https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
2673af0)Co-authored-by: John Villalovos john@sodarock.com
Clean up tox, pre-commit and requirements
(237b97c)
Correct a type-hint
(046607c)
Fix import ordering using isort
(f3afd34)
Fix the import ordering using isort.
https://pycqa.github.io/isort/
429d6c5)This will ensure everything is formatted with black, including setup.py.
ab343ef)Have flake8 run at the top-level of the projects instead of just the gitlab directory.
e4ce078)By explicitly NOT excluding the dotfiles we care about to the .gitignore file we make those files searchable by tools like ripgrep.
By default dotfiles are ignored by ripgrep and other search tools (not grep)
3c1a0b3)Always create GetMixin/GetWithoutIdMixin._optional_get_attrs attribute with a default value of tuple()
This way we don't need to use hasattr() and we will know the type of the attribute.
1ac0722)Move the 'gitlab/tests/' directory to 'tests/unit/' so we have all the tests located under the 'tests/' directory.
6aef2da)Be more strict and don't allow untyped definitions on the files we check.
Also this adds type-hints for two of the decorators so that now functions/methods decorated by them will have their types be revealed correctly.
Rename the 'tools/functional/' directory to 'tests/functional/'
This makes more sense as these are functional tests and not tools.
This was dicussed in: https://github.com/python-gitlab/python-gitlab/discussions/1468
df9b5f9)Add a helper function to have less code duplication in the functional testing.
0044bd2)Sync the create attributes with: https://docs.gitlab.com/ee/api/projects.html#create-project
Sync the update attributes with documentation at: https://docs.gitlab.com/ee/api/projects.html#edit-project
As a note the ordering of the attributes was done to match the ordering of the attributes in the documentation.
Closes: #1497
81f6386)Code was using inspect.getmro() to replicate the functionality of the built-in function issubclass()
Switch to using issubclass()
ci: Automate releases
(0ef497e)
ci: Ignore .python-version from pyenv
(149953d)
ci: Ignore debug and type_checking in coverage
(885b608)
ci: Use admin PAT for release workflow
(d175d41)
deps: Update dependency docker-compose to v1.29.2
(fc241e1)
deps: Update gitlab/gitlab-ce docker tag to v13.11.2-ce.0
(434d15d)
deps: Update gitlab/gitlab-ce docker tag to v13.11.3-ce.0
(f0b52d8)
deps: Update gitlab/gitlab-ce docker tag to v13.11.4-ce.0
(4223269)
deps: Update precommit hook alessandrojcm/commitlint-pre-commit-hook to v5
(9ff349d)
docs: Fix import order for readthedocs build
(c3de1fb)
dfa40c1)cbd4d52)This is useful when docs aren't included in the toctree and don't show up on RTD.
Fix typo in http_delete docstring
(5226f09)
api: Add behavior in local attributes when updating objects
(38f65e8)
fdc46ba)The python API was missing the field code_owner_approval_required as implemented in the GitLab REST API.
Add feature to get inherited member for project/group
(e444b39)
Add keys endpoint
(a81525a)
Add support for lists of integers to ListAttribute
(115938b)
Previously ListAttribute only support lists of integers. Now be more flexible and support lists of items which can be coerced into strings, for example integers.
This will help us fix issue #1407 by using ListAttribute for the 'iids' field.
e4421ca)By adding the file: py.typed it indicates that python-gitlab is a typed package and contains type-hints.
https://www.python.org/dev/peps/pep-0561/
api: Add deployment mergerequests interface
(fbbc0d4)
objects: Add pipeline test report support
(ee9f96e)
objects: Add support for billable members
(fb0b083)
objects: Add support for descendant groups API
(1b70580)
objects: Add support for generic packages API
(79d88bd)
feat(objects): add support for Group wikis
f731707)8e5b0de)Was incorrectly using the issue 'id' vs 'iid'.
This is a feature added in 3.8, removing it allows for the test to run with lower python versions.
functional: Add test for skip_groups list filter
(a014774)
functional: Explicitly remove deploy tokens on reset
(19a55d8)
Deploy tokens would remain in the instance if the respective project or group was deleted without explicitly revoking the deploy tokens first.
8f81456)Timing issues between requesting group deletion and GitLab enacting that deletion resulted in errors while attempting to delete a user which was the sole owner of said group (see: test_groups). Pass the 'hard_delete' parameter to ensure user deletion.
4c475ab)Additionally updates token creation to make use of first_or_create(), to avoid errors from the
script caused by GitLab constraints preventing duplicate tokens with the same value.
f875786)fix(files): do not url-encode file paths twice
8e25cec)update user's bool data and avatar
062f8f6)While adding type-hints mypy flagged this as an issue. The third argument to register_custom_action is supposed to be a tuple. It was being passed as a string rather than a tuple of strings.
Better real life token lookup example
(9ef8311)
Checking if RESTManager._from_parent_attrs is set
(8224b40)
Prior to commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 RESTManager._from_parent_attrs did not exist unless it was explicitly set. But commit 3727cbd21fc40b312573ca8da56e0f6cf9577d08 set it to a default value of {}.
So the checks using hasattr() were no longer valid.
Update the checks to check if RESTManager._from_parent_attrs has a value.
b180baf)ProjectFile.decode() returns 'bytes' and not 'str'.
Update the method's doc-string and add a type-hint.
ProjectFile.decode() returns the result of a call to base64.b64decode()
The docs for that function state it returns 'bytes': https://docs.python.org/3/library/base64.html#base64.b64decode
Fixes: #1403
8bd3124)Commit baea7215bbbe07c06b2ca0f97a1d3d482668d887 introduced type-hints for gitlab/mixins.py.
After starting to add type-hints to gitlab/v4/objects/users.py discovered a few errors.
Main error was using '=' instead of ':'. For example: _parent = Optional[...] should be _parent: Optional[...]
Resolved those issues.
19fde8e)Have been seeing intermittent failures of the test_delete_user() functional test. Have made the following changes to hopefully resolve the issue and if it still fails to know better why the failure occurred.
Extend the wait timeout for test_delete_user() from 30 to 60 tries of 0.5 seconds each.
Modify wait_for_sidekiq() to return True if sidekiq process terminated. Return False if the timeout expired.
Modify wait_for_sidekiq() to loop through all processes instead of assuming there is only one process. If all processes are not busy then return.
Modify wait_for_sidekiq() to sleep at least once before checking for processes being busy.
Check for True being returned in test_delete_user() call to wait_for_sidekiq()
b4dac5c)Git refnames are relatively free-form and can contain all sort for special characters, not just /
and #, see http://git-scm.com/docs/git-check-ref-format
In particular, Debian's DEP-14 standard for storing packaging in git repositories mandates the use
of the % character in tags in some cases like debian/2%2.6-21.
Unfortunately python-gitlab currently only escapes / to %2F and in some cases # to %23. This
means that when using the commit API to retrieve information about the debian/2%2.6-21 tag only
the slash is escaped before being inserted in the URL path and the % is left untouched,
resulting in something like /api/v4/projects/123/repository/commits/debian%2F2%2.6-21. When
urllib3 seees that it detects the invalid % escape and then urlencodes the whole string,
resulting in /api/v4/projects/123/repository/commits/debian%252F2%252.6-21, where the original
/ got escaped twice and produced %252F.
To avoid the issue, fully urlencode identifiers and parameters to avoid the urllib3 auto-escaping in all cases.
Signed-off-by: Emanuele Aina emanuele.aina@collabora.com
Gitlab allows setting the defaults for MR to delete the source. Also the inline help of the CLI suggest that a boolean is expected, but no matter what value you set, it will always delete.
Let the homedir be expanded in path of helper
(fc7387a)
Linting issues and test
(b04dd2c)
Make secret helper more user friendly
(fc2798f)
Only add query_parameters to GitlabList once
(ca2c3c9)
Fixes #1386
b9ecc9a)Some arguments to http_request were being read from kwargs, but kwargs is where this function
creates query parameters from, by default. In the absence of a query_parameters param, the
function would construct URLs with query parameters such as retry_transient_errors=True despite
those parameters having no meaning to the API to which the request was sent.
This change names those arguments that are specific to http_request so that they do not end up as
query parameters read from kwargs.
7c4e625)The classes UserStatus and UserStatusManager were each declared twice. Remove the duplicate declarations.
e78a8d6)Since there are two groups we can't depend on the one we changed to always be the first one returned.
Instead fetch the group we want and then test our assertion against that group.
f518e87)Previously running the pep8 target would fail as flake8 was not installed.
Now install flake8 for the pep8 target.
NOTE: Running the pep8 target fails as there are many warnings/errors.
But it does allow us to run it and possibly work on reducing these warnings/errors in the future.
In addition, add two checks to the ignore list as black takes care of formatting. The two checks added to the ignore list are: * E501: line too long * W503: line break before binary operator
48ec9e0)Discovered that there were some undefined names.
If we want to update email, avatar and do not send email confirmation change (skip_reconfirmation
= True), MultipartEncoder will try to encode everything except None and bytes. So it tries to
encode bools. Casting bool's values to their stringified int representation fix it.
15ec41c)Discovered this when I ran flake8 on the file. Unfortunately I was the one who introduced this wrong variable name :(
objects: Add single get endpoint for instance audit events
(c3f0a6f)
types: Prevent dir from producing duplicates
(5bf7525)
147f05d)Add the attributes: _create_attrs and _update_attrs to the RESTManager class. This is so that we stop using getattr() if we don't need to.
This also helps with type-hints being available for these attributes.
ad72ef3)Add type-hints for the variables which are set via self.dict
mypy doesn't see them when they are assigned via self.dict. So declare them in the class definition.
8837207)Was able to figure out better type-hints for gitlab/client.py
Add test
(f8cf1e1)
Add type hints to gitlab/base.py
(3727cbd)
Add type hints to gitlab/base.py:RESTManager
(9c55593)
Add some additional type hints to gitlab/base.py
Adding some initial type-hints to gitlab/client.py
Add type-hints to gitlab/config.py
(213e563)
Add type-hints to gitlab/const.py
(a10a777)
Bump version to 2.7.0
(34c4052)
Del 'import *' in gitlab/v4/objects/project_access_tokens.py
(9efbe12)
Remove usage of 'import *' in gitlab/v4/objects/project_access_tokens.py.
907634f)Don't allow a partially annotated function definition. Either none of the function is annotated or all of it must be.
Update code to ensure no-more partially annotated functions.
Update gitlab/cli.py with better type-hints. Changed Tuple[Any, ...] to Tuple[str, ...]
233b79e)As we only support the v4 Gitlab API, explicitly import gitlab.v4.objects and gitlab.v4.clie instead of dynamically importing it depending on the API version.
This has the added benefit of mypy being able to type check the Gitlab init() function as currently it will fail if we enable type checking of init() it will fail.
Also, this also helps by not confusing tools like pyinstaller/cx_freeze with dynamic imports so you don't need hooks for standalone executables. And according to https://docs.gitlab.com/ee/api/,
"GraphQL co-exists with the current v4 REST API. If we have a v5 API, this should be a compatibility layer on top of GraphQL."
630901b)E711: Comparison to none should be 'if cond is none:'
https://www.flake8rules.com/rules/E711.html
83670a4)E712: Comparison to true should be 'if cond is true:' or 'if cond:'
https://www.flake8rules.com/rules/E712.html
380f227)Fixes to resolve errors for: https://www.flake8rules.com/rules/E741.html Do not use variables named 'I', 'O', or 'l' (E741)
https://www.flake8rules.com/rules/E742.html Do not define classes named 'I', 'O', or 'l' (E742)
ff21eb6)F401: Module imported but unused
https://www.flake8rules.com/rules/F401.html
40f4ab2)Local variable name is assigned to but never used
https://www.flake8rules.com/rules/F841.html
Fix package file test naming
(8c80268)
Fix typo in mr events
(c5e6fb3)
Have _create_attrs & _update_attrs be a namedtuple
(aee1f49)
Convert _create_attrs and _update_attrs to use a NamedTuple (RequiredOptional) to help with code readability. Update all code to use the NamedTuple.
Determined the base class for obj_cls and adding type-hints for it.
924f83e)We now create _types = {} in RESTManager class.
By making _types always present in RESTManager it makes the code simpler. We no longer have to do: types = getattr(self, "_types", {})
And the type checker now understands the type.
Make lint happy
(7a7c9fd)
Make lint happy
(b5f43c8)
Make lint happy
(732e49c)
Make ListMixin._list_filters always present
(8933113)
Always create ListMixin._list_filters attribute with a default value of tuple().
This way we don't need to use hasattr() and we will know the type of the attribute.
6d55120)Always create RESTObject._short_print_attrs with a default value of None.
This way we don't need to use hasattr() and we will know the type of the attribute.
b562458)To be safe that we don't assert while running, put the assert statements, which are used by mypy to check that types are correct, inside an 'if TYPE_CHECKING:' block.
Also, instead of asserting that the item is a dict, instead assert that it is not a requests.Response object. Theoretically the JSON could return as a list or dict, though at this time we are assuming a dict.
39b9183)Initially when extracting out the gitlab/client.py code we tried to remove this but functional tests failed.
Later we fixed the functional test that was failing, so now remove the unneeded import.
b5d4e40)httplib is a Python 2 library. It was renamed to http.client in Python 3.
https://docs.python.org/2.7/library/httplib.html
3d5d5d8)The variable ALLOWED_KEYSET_ENDPOINTS was added in commit f86ef3bbdb5bffa1348a802e62b281d3f31d33ad.
Then most of that commit was removed in commit e71fe16b47835aa4db2834e98c7ffc6bdec36723, but ALLOWED_KEYSET_ENDPOINTS was missed.
009d369)The function _construct_url() was used by the v3 API. All usage of the function was removed in commit fe89b949922c028830dd49095432ba627d330186
443b934)The function sanitize_parameters() was used when the v3 API was in use. Since v3 API support has been removed there are no more users of this function.
c83eaf4)In gitlab/v4/objects/*.py remove usage of: * from gitlab.base import * * from gitlab.mixins import *
Change them to: * from gitlab.base import CLASS_NAME * from gitlab.mixins import CLASS_NAME
Programmatically update code to explicitly import needed classes only.
After the change the output of: $ flake8 gitlab/v4/objects/*py | grep 'REST|Mixin'
Is empty. Before many messages about unable to determine if it was a valid name.
bf0c8c5)In gitlab/client.py remove usage of: * from gitlab.const import * * from gitlab.exceptions import *
Change them to: * import gitlab.const * import gitlab.exceptions
Update code to explicitly reference things in gitlab.const and gitlab.exceptions
A flake8 run no longer lists any undefined variables. Before it listed possible undefined variables.
2afd18a)Remove usage of getattr(self, "_update_uses_post", False)
Instead add it to class and set default value to False.
Add a tests that shows it is set to True for the ProjectMergeRequestApprovalManager and ProjectApprovalManager classes.
api: Move repository endpoints into separate module
(1ed154c)
ci: Deduplicate PR jobs
(63918c3)
config: Allow simple commands without external script
(91ffb8e)
deps: Update dependency docker-compose to v1.28.3
(2358d48)
deps: Update dependency docker-compose to v1.28.4
(8938484)
deps: Update dependency docker-compose to v1.28.5
(f4ab558)
deps: Update dependency docker-compose to v1.28.6
(46b05d5)
deps: Update dependency docker-compose to v1.29.1
(a89ec43)
deps: Update dependency sphinx to v3.4.3
(37c992c)
deps: Update dependency sphinx to v3.5.0
(188c5b6)
deps: Update dependency sphinx to v3.5.1
(f916f09)
deps: Update dependency sphinx to v3.5.2
(9dee5c4)
deps: Update dependency sphinx to v3.5.4
(a886d28)
deps: Update gitlab/gitlab-ce docker tag to v13.10.0-ce.0
(5221e33)
deps: Update gitlab/gitlab-ce docker tag to v13.10.1-ce.0
(1995361)
deps: Update gitlab/gitlab-ce docker tag to v13.10.3-ce.0
(eabe091)
deps: Update gitlab/gitlab-ce docker tag to v13.11.0-ce.0
(711896f)
deps: Update gitlab/gitlab-ce docker tag to v13.11.1-ce.0
(3088714)
deps: Update gitlab/gitlab-ce docker tag to v13.8.2-ce.0
(7c12038)
deps: Update gitlab/gitlab-ce docker tag to v13.8.3-ce.0
(e6c20f1)
deps: Update gitlab/gitlab-ce docker tag to v13.8.4-ce.0
(832cb88)
deps: Update gitlab/gitlab-ce docker tag to v13.9.0-ce.0
(3aef19c)
deps: Update gitlab/gitlab-ce docker tag to v13.9.1-ce.0
(f6fd995)
deps: Update gitlab/gitlab-ce docker tag to v13.9.2-ce.0
(933ba52)
deps: Update gitlab/gitlab-ce docker tag to v13.9.3-ce.0
(2ddf45f)
deps: Update gitlab/gitlab-ce docker tag to v13.9.4-ce.0
(939f769)
deps: Update precommit hook alessandrojcm/commitlint-pre-commit-hook to v4
(505a8b8)
deps: Update wagoid/commitlint-github-action action to v3
(b3274cf)
objects: Make Project refreshable
(958a6aa)
Helps getting the real state of the project from the server.
2953642)It's mostly an internal thing anyway and can be removed in 3.0.0
66f0b6c)Add docs and examples for custom user agent
(a69a214)
Add information about the gitter community
(6ff67e7)
Add a section in the README.rst about the gitter community. The badge already exists and is useful but very easy to miss.
Change travis-ci badge to githubactions
(2ba5ba2)
api: Add examples for resource state events
(4d00c12)
api: Add release links API docs
(36d65f0)
fdec039)Add an initial mypy test to test gitlab/base.py and gitlab/init.py
2bb16fa)See: https://docs.gitlab.com/ee/api/personal_access_tokens.html
Add ProjectPackageFile and the ability to list project package package_files.
Fixes #1372
ff3013a)I'd like to use this libary to automate importing Bitbucket Server repositories into GitLab. There is a GitLab API endpoint to do this, but it is not exposed through this library.
import_bitbucket_server method to the ProjectManager. This method calls this GitLab API
endpoint: https://docs.gitlab.com/ee/api/import.html#import-repository-from-bitbucket-server *
Modify import_gitlab method docstring for python3 compatibility * Add a skipped stub test for
the existing import_github methodOption to add a helper to lookup token
(8ecf559)
api,cli: Make user agent configurable
(4bb201b)
issues: Add missing get verb to IssueManager
(f78ebe0)
objects: Add Release Links API support
(28d7518)
objects: Add support for group audit events API
(2a0fbdf)
objects: Add support for resource state events API
(d4799c4)
projects: Add project access token api
(1becef0)
users: Add follow/unfollow API
(e456869)
53a7645)Move the classes Gitlab and GitlabList from gitlab/init.py to the newly created gitlab/client.py file.
Update one test case that was depending on requests being defined in gitlab/init.py
api: Explicitly export classes for star imports
(f05c287)
objects: Move instance audit events where they belong
(48ba88f)
v4: Split objects and managers per API resource
(a5a48ad)
5d94846)Co-authored-by: Nejc Habjan hab.nejc@gmail.com
added support for pipeline bridges
Docs changed using the consts
(650b65c)
Typo
(9baa905)
api: Add missing runner access_level param
(92669f2)
api: Use RetrieveMixin for ProjectLabelManager
(1a14395)
Allows to get a single label from a project, which was missing before even though the GitLab API has the ability to.
e1e0d8c)This fixes and error, where deleted attributes would not show up
Fixes #1155
Added constants for search API
(8ef53d6)
Added docs for search scopes constants
(7565bf0)
Allow overriding docker-compose env vars for tag
(27109ca)
Apply suggestions
(65ce026)
Move .env into docker-compose dir
(55cbd1c)
Offically support and test 3.9
(62dd07d)
Remove unnecessary random function
(d4ee0a6)
Simplified search scope constants
(16fc048)
Use helper fixtures for test directories
(40ec2f5)
ci: Add .readthedocs.yml
(0ad441e)
ci: Add coverage and docs jobs
(2de64cf)
ci: Add pytest PR annotations
(8f92230)
ci: Fix copy/paste oopsie
(c6241e7)
ci: Fix typo in matrix
(5e1547a)
ci: Force colors in pytest runs
(1502079)
ci: Pin docker-compose install for tests
(1f7a2ab)
This ensures python-dotenv with expected behavior for .env processing
ci: Pin os version
(cfa27ac)
ci: Reduce renovate PR noise
(f4d7a55)
ci: Replace travis with Actions
(8bb73a3)
cli: Remove python2 code
(1030e0a)
deps: Pin dependencies
(14d8f77)
deps: Pin dependency requests-toolbelt to ==0.9.1
(4d25f20)
deps: Update dependency requests to v2.25.1
(9c2789e)
deps: Update gitlab/gitlab-ce docker tag to v13.3.3-ce.0
(667bf01)
deps: Update gitlab/gitlab-ce docker tag to v13.3.4-ce.0
(e94c4c6)
deps: Update gitlab/gitlab-ce docker tag to v13.3.5-ce.0
(c88d870)
deps: Update gitlab/gitlab-ce docker tag to v13.3.6-ce.0
(57b5782)
deps: Update gitlab/gitlab-ce docker tag to v13.4.3-ce.0
(bc17889)
deps: Update gitlab/gitlab-ce docker tag to v13.5.0-ce.0
(fc205cc)
deps: Update gitlab/gitlab-ce docker tag to v13.5.1-ce.0
(348e860)
deps: Update gitlab/gitlab-ce docker tag to v13.5.2-ce.0
(4a6831c)
deps: Update gitlab/gitlab-ce docker tag to v13.5.3-ce.0
(d1b0b08)
deps: Update gitlab/gitlab-ce docker tag to v13.5.4-ce.0
(265dbbd)
deps: Update gitlab/gitlab-ce docker tag to v13.8.1-ce.0
(9854d6d)
deps: Update python docker tag to v3.9
(1fc65e0)
docs: Always edit the file directly on master
(35e43c5)
There is no way to edit the raw commit
9384493)Add Project Merge Request approval rule documentation
(449fc26)
Clean up grammar and formatting in documentation
(aff9bc7)
cli: Add auto-generated CLI reference
(6c21fc8)
cli: Add example for job artifacts download
(375b29d)
cli: Use inline anonymous references for external links
(f2cf467)
There doesn't seem to be an obvious way to use an alias for identical text labels that link to different targets. With inline links we can work around this shortcoming. Until we know better.
cli-usage: Fixed term
(d282a99)
groups: Add example for creating subgroups
(92eb4e3)
issues: Add admin, project owner hint
(609c03b)
Closes #1101
54921db)Closes #1126
8894f2d)Otherwise the whole testsuite will refuse to run
20b1e79)49eb3ca)A "minimal access" access level was introduced in GitLab 13.5.
Added support for pipeline bridges
(05cbdc2)
Adds support for project merge request approval rules
(#1199,
c6fbf39)
Support multipart uploads
(2fa3004)
Unit tests added
(f37ebf5)
api: Add support for user identity provider deletion
(e78e121)
api: Added wip filter param for merge requests
(d6078f8)
api: Added wip filter param for merge requests
(aa6e80d)
tests: Test label getter
(a41af90)
61e43eb)Add test_project_merge_request_approvals.py
(9f6335f)
Add unit tests for badges API
(2720b73)
Add unit tests for resource label events API
(e9a211c)
Ignore failing test for now
(4b4e253)
cli: Add test for job artifacts download
(f4e7950)
env: Replace custom scripts with pytest and docker-compose
(79489c7)
add support to resource milestone events (88f8cc78), closes #1154
Implement Gitlab's behavior change for owned=True
(9977799)
Tests fail when using REUSE_CONTAINER option
(0078f89)
Fixes #1146
b5c267e)Since version 10.3 (and later), param to not send (re)confirmation when updating an user is
skip_reconfirmation (and not skip_confirmation).
See:
Bump python-gitlab to 2.5.0
(56fef01)
Make latest black happy with existing code
(6961479)
Make latest black happy with existing code
(4039c8c)
Make latest black happy with existing code
(d299753)
Remove remnants of python2 imports
(402566a)
Remove unnecessary import
(f337b7a)
Run unittest2pytest on all unit tests
(11383e7)
Update tools dir for latest black version
(c2806d8)
Update tools dir for latest black version
(f245ffb)
ci: Pin gitlab-ce version for renovate
(cb79fb7)
ci: Use fixed black version
(9565684)
deps: Update gitlab/gitlab-ce docker tag to v13.3.2-ce.0
(9fd778b)
deps: Update python docker tag to v3.8
(a8070f2)
env: Add pre-commit and commit-msg hooks
(82070b2)
test: Use pathlib for paths
(5a56b6b)
9e94b75)Showing how to delete without having to pull the file
api: Add example for latest pipeline job artifacts
(d20f022)
cli: Add examples for group-project list
(af86dcd)
packages: Add examples for Packages API and cli usage
(a47dfcd)
variables: Add docs for instance-level variables
(ad4b87c)
Fixes #1154
api: Add endpoint for latest ref artifacts
(b7a07fc)
api: Add support for instance variables
(4492fc4)
api: Add support for Packages API
(71495d1)
Rewrite unit tests for objects with responses
(204782a)
Split unit tests by GitLab API resources
(76b2cad)
Turn objects module into a package
(da8af6f)
1317f4b)Fixes #1154
make query kwargs consistent between call in init and next
Co-authored-by: Traian Nedelea tron1point0@pm.me
Make query kwargs consistent between call in init and next
(72ffa01)
Pass kwargs to subsequent queries in gitlab list
(1d011ac)
merge: Parse arguments as query_data
(878098b)
1606310)9a068e0)This uses a context instead of inventing your own stream handler which makes the code simpler and should be fine for most use cases.
Signed-off-by: Paul Spooren mail@aparcar.org
dab4d0a)This constant is useful for cases where no access is granted, e.g. when creating a protected branch.
The NO_ACCESS const corresponds to the definition in
https://docs.gitlab.com/ee/api/protected_branches.html
revert keyset pagination by default
e71fe16)Instead we set pagination to offset on the other paths
870e7ea)add play command to project pipeline schedules
f86ef3b)Workaround for https://gitlab.com/gitlab-org/gitlab/-/issues/218504. Remove this in 13.1
ee2df6f)Fixes #1094
ad8c67d)Bring commit signatures up to date with 12.10
(dc382fe)
Bump to 2.3.0
(01ff865)
Correctly render rst
(f674bf2)
Fix typo in docstring
(c20f5f1)
Remove old builds-email service
(c60e2df)
Use pytest for unit tests and coverage
(9787a40)
ci: Add codecov integration to Travis
(e230568)
services: Update available service attributes
(7afc357)
test: Remove outdated token test
(e6c9fe9)
Update authors
(ac0c84d)
readme: Add codecov badge for master
(e21b2c5)
readme: Update test docs
(6e2b1ec)
remote_mirrors: Fix create command
(bab91fe)
remote_mirrors: Fix create command
(1bb4e42)
fix: remove version from setup
feat: add pipeline schedule play error exception
docs: add documentation for pipeline schedule play
401e702)It can be useful (especially in scripts) to specify a configuration location via an environment variable. If the "PYTHON_GITLAB_CFG" environment variable is defined, treat its value as the path to a configuration file and include it in the set of default configuration locations.
api: Added support in the GroupManager to upload Group avatars
(28eb7ea)
services: Add project service list API
(fc52221)
Can be used to list available services It was introduced in GitLab 12.7
cad134c)add missing import_project param
Add missing import_project param
(9b16614)
types: Do not split single value string in ListAttribute
(a26e585)
Bump to 2.2.0
(22d4b46)
Clean up for black and flake8
(4fede5d)
Fix typo in allow_failures
(265bbdd)
Flatten test_import_github
(b8ea96c)
Improve and document testing against different images
(98d3f77)
Move test_import_github into TestProjectImport
(a881fb7)
Pass environment variables in tox
(e06d33c)
Remove references to python2 in test env
(6e80723)
Rename ExportMixin to DownloadMixin
(847da60)
Co-Authored-By: Nejc Habjan hab.nejc@gmail.com
6ce5d1f)Co-Authored-By: Nejc Habjan hab.nejc@gmail.com
ac6b2da)Co-Authored-By: Nejc Habjan hab.nejc@gmail.com
7993c93)f493b73)This commit adds the v4 Create project attributes necessary to create a project from a project, instance, or group level template as documented in https://docs.gitlab.com/ee/api/projects.html#create-project
Add support for commit GPG signature API
(da7a809)
api: Add support for Gitlab Deploy Token API
(01de524)
api: Add support for Group Import/Export API
(#1037,
6cb9d92)
Add unit tests for Project Export
(600dc86)
Add unit tests for Project Import
(f7aad5f)
Create separate module for commit tests
(8c03771)
Move mocks to top of module
(0bff713)
Prepare base project test class for more tests
(915587f)
api: Add tests for group export/import API
(e7b2d6c)
types: Reproduce get_for_api splitting strings
(#1057,
babd298)
Fix regression, when using keyset pagination with merge requests. Related to https://github.com/python-gitlab/python-gitlab/issues/1044
This change was made to migate an issue in Gitlab (again). Fix available in: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26792
users: update user attributes
This change was made to migate an issue in Gitlab (again). Fix available in: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26792
do not require empty data dict for create()
all=True (99b4484d)Do not require empty data dict for create()
(99d959f)
Remove null values from features POST data, because it fails
(1ec1816)
Return response with commit data
(b77b945)
docs: Fix typo in user memberships example
(33889bc)
docs: Update to new set approvers call for # of approvers
(8e0c526)
to set the # of approvers for an MR you need to use the same function as for setting the approvers id.
2cf12c7)Updated the docs with the new set_approvers arguments, and updated tests with the arg as well.
70c0cfb)Updating approvers new api needs a POST call. Also It needs a name of the new rule, defaulting this to 'name'.
65ecadc)Added a miss paramter update to the set_approvers function
e512cdd)Updated the gitlab path for set_approvers to approvers_rules, added default arg for rule type, and added arg for # of approvals required.
adc9101)Bump version to 2.1.0
(47cb58c)
Ensure developers use same gitlab image as Travis
(fab17fc)
Fix broken requests links
(b392c21)
Another case of the double slash rewrite.
ad3e833)Co-Authored-By: Mitar mitar.git@tnode.com
Add capability to control GitLab features per project or group
(7f192b4)
Use keyset pagination by default for all=True
(99b4484)
api: Add support for GitLab OAuth Applications API
(4e12356)
3834d9c)This change was made to migate an issue in Gitlab. See: https://gitlab.com/gitlab-org/gitlab/issues/202070
This change was made to migate an issue in Gitlab. See: https://gitlab.com/gitlab-org/gitlab/issues/202070
a6c0660)There are a few more features in there
I've misread the tag
27375f6)This also workarounds an GitLab issue, where private_profile, would reset to false if not supplied
c9329bb)projects: adjust snippets to match the API
e104e21)Stepping thru Sphinx versions from 1.6.5 to 1.7.5 build_sphinx fails. Once Sphinx == 1.7.6 build_sphinx finished.
3f78aa3)for security reasons
c817dcc)Dropping support for legacy python requires a new major version
af8679a)Support dropped for: 2.7, 3.4, 3.5
70176db)Fixes #969
Add appearance API
(4c4ac5c)
Add autocompletion support
(973cb8b)
Add global order_by option to ease pagination
(d187925)
Support keyset pagination globally
(0b71ba4)
This is most likely only useful for the CLI
ignore all parameter, when as_list=True 137d72b3, closes #962
137d72b)Closes #962
06a8050)The function file.delete() requires branch argument in addition to commit_message.
482e57b)Fixes #966
aa4d41b)Addresses python-gitlab/python-gitlab#952
This adds a method to the ProjectManager called import_github, which maps to the
/import/github API endpoint. Calling import_github will trigger an import operation from
<repo_id> into <target_namespace>, using <personal_access_token> to authenticate against github.
In practice a gitlab server may take many 10's of seconds to respond to this API call, so we also
take the liberty of increasing the default timeout (only for this method invocation).
Unfortunately since import is a protected keyword in python, I was unable to follow the endpoint
structure with the manager namespace. I'm open to suggestions on a more sensible interface.
I'm successfully using this addition to batch-import hundreds of github repositories into gitlab.
0986c93)This adds the ci variables types for create/update requests.
See https://docs.gitlab.com/ee/api/group_level_variables.html#create-variable
4724c50)This adds the ci variables types and protected flag for create/update requests.
See https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable
db0b00a)Fixes #967
e9a8289)On startup, the timeout parameter is loaded from config and stored on the base gitlab object
instance. This instance parameter is used as the timeout for all API requests (it's passed into
the session object when making HTTP calls).
This change allows any API method to specify a timeout argument to **kwargs that will override
the global timeout value. This was somewhat needed / helpful for the import_github method.
I have also updated the docs accordingly.
Fixes #970
added missing attributes for project approvals 460ed63c
460ed63)Reference: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-configuration
Missing attributes: * merge_requests_author_approval * merge_requests_disable_committers_approval
727f536)Otherwise, we get: File "gitlabracadabra/mixins/labels.py", line 67, in _process_labels current_label.save() File "gitlab/exceptions.py", line 267, in wrapped_f return f(*args, **kwargs) File "gitlab/v4/objects.py", line 896, in save self._update_attrs(server_data) File "gitlab/base.py", line 131, in _update_attrs self.dict["_attrs"].update(new_attrs) TypeError: 'NoneType' object is not iterable
Because server_data is None.
project-fork: Copy create fix from ProjectPipelineManager
(516307f)
project-fork: Correct path computation for project-fork list
(44a7c27)
Add project and group cluster examples
(d15801d)
Fix typo
(d9871b1)
changelog: Add notice for release-notes on Github
(#938,
de98e57)
pipelines_and_jobs: Add pipeline custom variables usage example
(b275eb0)
readme: Fix Docker image reference
(b9a40d8)
v1.8.0 is not available. ``` Unable to find image 'registry.gitlab.com/python-gitlab/python-gitlab:v1.8.0' locally docker: Error response from daemon: manifest for registry.gitlab.com/python-gitlab/python-gitlab:v1.8.0 not found: manifest unknown: manifest unknown.
- **snippets**: Fix snippet docs
([`bbaa754`](https://github.com/python-gitlab/python-gitlab/commit/bbaa754673c4a0bffece482fe33e4875ddadc2dc))
Fixes #954
### Features
- Add audit endpoint
([`2534020`](https://github.com/python-gitlab/python-gitlab/commit/2534020b1832f28339ef466d6dd3edc21a521260))
- Add project and group clusters
([`ebd053e`](https://github.com/python-gitlab/python-gitlab/commit/ebd053e7bb695124c8117a95eab0072db185ddf9))
- Add support for include_subgroups filter
([`adbcd83`](https://github.com/python-gitlab/python-gitlab/commit/adbcd83fa172af2f3929ba063a0e780395b102d8))
## v1.13.0 (2019-11-02)
### Bug Fixes
- **projects**: Support `approval_rules` endpoint for projects
([`2cef2bb`](https://github.com/python-gitlab/python-gitlab/commit/2cef2bb40b1f37b97bb2ee9894ab3b9970cef231))
The `approvers` API endpoint is deprecated [1]. GitLab instead uses the `approval_rules` API
endpoint to modify approval settings for merge requests. This adds the functionality for
project-level merge request approval settings.
Note that there does not exist an endpoint to 'get' a single approval rule at this moment - only
'list'.
[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html
### Chores
- Bump version to 1.13.0
([`d0750bc`](https://github.com/python-gitlab/python-gitlab/commit/d0750bc01ed12952a4d259a13b3917fa404fd435))
- **ci**: Update latest docker image for every tag
([`01cbc7a`](https://github.com/python-gitlab/python-gitlab/commit/01cbc7ad04a875bea93a08c0ce563ab5b4fe896b))
- **dist**: Add test data
([`3133ed7`](https://github.com/python-gitlab/python-gitlab/commit/3133ed7d1df6f49de380b35331bbcc67b585a61b))
Closes #907
- **setup**: We support 3.8 ([#924](https://github.com/python-gitlab/python-gitlab/pull/924),
[`6048175`](https://github.com/python-gitlab/python-gitlab/commit/6048175ef2c21fda298754e9b07515b0a56d66bd))
* chore(setup): we support 3.8
* style: format with black
### Documentation
- Projects get requires id
([`5bd8947`](https://github.com/python-gitlab/python-gitlab/commit/5bd8947bd16398aed218f07458aef72e67f2d130))
Also, add an example value for project_id to the other projects.get() example.
- **project**: Fix group project example
([`e680943`](https://github.com/python-gitlab/python-gitlab/commit/e68094317ff6905049e464a59731fe4ab23521de))
GroupManager.search is removed since 9a66d78, use list(search='keyword') instead
### Features
- Add deployment creation
([`ca256a0`](https://github.com/python-gitlab/python-gitlab/commit/ca256a07a2cdaf77a5c20e307d334b82fd0fe861))
Added in GitLab 12.4
Fixes #917
- Add users activate, deactivate functionality
([`32ad669`](https://github.com/python-gitlab/python-gitlab/commit/32ad66921e408f6553b9d60b6b4833ed3180f549))
These were introduced in GitLab 12.4
- Send python-gitlab version as user-agent
([`c22d49d`](https://github.com/python-gitlab/python-gitlab/commit/c22d49d084d1e03426cfab0d394330f8ab4bd85a))
- **auth**: Remove deprecated session auth
([`b751cdf`](https://github.com/python-gitlab/python-gitlab/commit/b751cdf424454d3859f3f038b58212e441faafaf))
- **doc**: Remove refs to api v3 in docs
([`6beeaa9`](https://github.com/python-gitlab/python-gitlab/commit/6beeaa993f8931d6b7fe682f1afed2bd4c8a4b73))
- **test**: Unused unittest2, type -> isinstance
([`33b1801`](https://github.com/python-gitlab/python-gitlab/commit/33b180120f30515d0f76fcf635cb8c76045b1b42))
### Testing
- Remove warning about open files from test_todo()
([`d6419aa`](https://github.com/python-gitlab/python-gitlab/commit/d6419aa86d6ad385e15d685bf47242bb6c67653e))
When running unittests python warns that the json file from test_todo() was still open. Use with to
open, read, and create encoded json data that is used by resp_get_todo().
- **projects**: Support `approval_rules` endpoint for projects
([`94bac44`](https://github.com/python-gitlab/python-gitlab/commit/94bac4494353e4f597df0251f0547513c011e6de))
## v1.12.1 (2019-10-07)
### Bug Fixes
- Fix not working without auth
([`03b7b5b`](https://github.com/python-gitlab/python-gitlab/commit/03b7b5b07e1fd2872e8968dd6c29bc3161c6c43a))
## v1.12.0 (2019-10-06)
### Bug Fixes
- **cli**: Fix cli command user-project list
([`c17d7ce`](https://github.com/python-gitlab/python-gitlab/commit/c17d7ce14f79c21037808894d8c7ba1117779130))
- **labels**: Don't mangle label name on update
([`1fb6f73`](https://github.com/python-gitlab/python-gitlab/commit/1fb6f73f4d501c2b6c86c863d40481e1d7a707fe))
- **todo**: Mark_all_as_done doesn't return anything
([`5066e68`](https://github.com/python-gitlab/python-gitlab/commit/5066e68b398039beb5e1966ba1ed7684d97a8f74))
### Chores
- Bump to 1.12.0
([`4648128`](https://github.com/python-gitlab/python-gitlab/commit/46481283a9985ae1b07fe686ec4a34e4a1219b66))
- **ci**: Build test images on tag
([`0256c67`](https://github.com/python-gitlab/python-gitlab/commit/0256c678ea9593c6371ffff60663f83c423ca872))
### Code Style
- Format with black
([`fef085d`](https://github.com/python-gitlab/python-gitlab/commit/fef085dca35d6b60013d53a3723b4cbf121ab2ae))
### Documentation
- **project**: Add submodule docs
([`b5969a2`](https://github.com/python-gitlab/python-gitlab/commit/b5969a2dcea77fa608cc29be7a5f39062edd3846))
- **projects**: Add note about project list
([`44407c0`](https://github.com/python-gitlab/python-gitlab/commit/44407c0f59b9602b17cfb93b5e1fa37a84064766))
Fixes #795
- **repository-tags**: Fix typo
([`3024c5d`](https://github.com/python-gitlab/python-gitlab/commit/3024c5dc8794382e281b83a8266be7061069e83e))
Closes #879
- **todo**: Correct todo docs
([`d64edcb`](https://github.com/python-gitlab/python-gitlab/commit/d64edcb4851ea62e72e3808daf7d9b4fdaaf548b))
### Features
- Add support for job token
([`cef3aa5`](https://github.com/python-gitlab/python-gitlab/commit/cef3aa51a6928338c6755c3e6de78605fae8e59e))
See https://docs.gitlab.com/ee/api/jobs.html#get-job-artifacts for usage
- **ci**: Improve functionnal tests
([`eefceac`](https://github.com/python-gitlab/python-gitlab/commit/eefceace2c2094ef41d3da2bf3c46a58a450dcba))
- **project**: Add file blame api
([`f5b4a11`](https://github.com/python-gitlab/python-gitlab/commit/f5b4a113a298d33cb72f80c94d85bdfec3c4e149))
https://docs.gitlab.com/ee/api/repository_files.html#get-file-blame-from-repository
- **project**: Implement update_submodule
([`4d1e377`](https://github.com/python-gitlab/python-gitlab/commit/4d1e3774706f336e87ebe70e1b373ddb37f34b45))
- **user**: Add status api
([`62c9fe6`](https://github.com/python-gitlab/python-gitlab/commit/62c9fe63a47ddde2792a4a5e9cd1c7aa48661492))
### Refactoring
- Remove obsolete test image
([`a14c02e`](https://github.com/python-gitlab/python-gitlab/commit/a14c02ef85bd4d273b8c7f0f6bd07680c91955fa))
Follow up of #896
- Remove unused code, simplify string format
([`c7ff676`](https://github.com/python-gitlab/python-gitlab/commit/c7ff676c11303a00da3a570bf2893717d0391f20))
### Testing
- Re-enabled py_func_v4 test
([`49d84ba`](https://github.com/python-gitlab/python-gitlab/commit/49d84ba7e95fa343e622505380b3080279b83f00))
- **func**: Disable commit test
([`c9c76a2`](https://github.com/python-gitlab/python-gitlab/commit/c9c76a257d2ed3b394f499253d890c2dd9a01e24))
GitLab seems to be randomly failing here
- **status**: Add user status test
([`fec4f9c`](https://github.com/python-gitlab/python-gitlab/commit/fec4f9c23b8ba33bb49dca05d9c3e45cb727e0af))
- **submodules**: Correct test method
([`e59356f`](https://github.com/python-gitlab/python-gitlab/commit/e59356f6f90d5b01abbe54153441b6093834aa11))
- **todo**: Add unittests
([`7715567`](https://github.com/python-gitlab/python-gitlab/commit/77155678a5d8dbbf11d00f3586307694042d3227))
## v1.11.0 (2019-08-31)
### Bug Fixes
- Add project and group label update without id to fix cli
([`a3d0d7c`](https://github.com/python-gitlab/python-gitlab/commit/a3d0d7c1e7b259a25d9dc84c0b1de5362c80abb8))
- Remove empty dict default arguments
([`8fc8e35`](https://github.com/python-gitlab/python-gitlab/commit/8fc8e35c63d7ebd80408ae002693618ca16488a7))
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
- Remove empty list default arguments
([`6e204ce`](https://github.com/python-gitlab/python-gitlab/commit/6e204ce819fc8bdd5359325ed7026a48d63f8103))
Signed-off-by: Frantisek Lachman <flachman@redhat.com>
- **projects**: Avatar uploading for projects
([`558ace9`](https://github.com/python-gitlab/python-gitlab/commit/558ace9b007ff9917734619c05a7c66008a4c3f0))
### Chores
- Bump package version
([`37542cd`](https://github.com/python-gitlab/python-gitlab/commit/37542cd28aa94ba01d5d289d950350ec856745af))
### Features
- Add methods to retrieve an individual project environment
([`29de40e`](https://github.com/python-gitlab/python-gitlab/commit/29de40ee6a20382c293d8cdc8d831b52ad56a657))
- Group labels with subscriptable mixin
([`4a9ef9f`](https://github.com/python-gitlab/python-gitlab/commit/4a9ef9f0fa26e01fc6c97cf88b2a162e21f61cce))
### Testing
- Add group label cli tests
([`f7f24bd`](https://github.com/python-gitlab/python-gitlab/commit/f7f24bd324eaf33aa3d1d5dd12719237e5bf9816))
## v1.10.0 (2019-07-22)
### Bug Fixes
- Convert # to %23 in URLs
([`14f5385`](https://github.com/python-gitlab/python-gitlab/commit/14f538501bfb47c92e02e615d0817675158db3cf))
Refactor a bit to handle this change, and add unit tests.
Closes #779
- Docker entry point argument passing
([`67ab637`](https://github.com/python-gitlab/python-gitlab/commit/67ab6371e69fbf137b95fd03105902206faabdac))
Fixes the problem of passing spaces in the arguments to the docker entrypoint.
Before this fix, there was virtually no way to pass spaces in arguments such as task description.
- Enable use of YAML in the CLI
([`ad0b476`](https://github.com/python-gitlab/python-gitlab/commit/ad0b47667f98760d6a802a9d08b2da8f40d13e87))
In order to use the YAML output, PyYaml needs to be installed on the docker image. This commit adds
the installation to the dockerfile as a separate layer.
- Handle empty 'Retry-After' header from GitLab
([`7a3724f`](https://github.com/python-gitlab/python-gitlab/commit/7a3724f3fca93b4f55aed5132cf46d3718c4f594))
When requests are throttled (HTTP response code 429), python-gitlab assumed that 'Retry-After'
existed in the response headers. This is not always the case and so the request fails due to a
KeyError. The change in this commit adds a rudimentary exponential backoff to the 'http_request'
method, which defaults to 10 retries but can be set to -1 to retry without bound.
- Improve pickle support
([`b4b5dec`](https://github.com/python-gitlab/python-gitlab/commit/b4b5decb7e49ac16d98d56547a874fb8f9d5492b))
- Pep8 errors
([`334f9ef`](https://github.com/python-gitlab/python-gitlab/commit/334f9efb18c95bb5df3271d26fa0a55b7aec1c7a))
Errors have not been detected by broken travis runs.
- Re-add merge request pipelines
([`877ddc0`](https://github.com/python-gitlab/python-gitlab/commit/877ddc0dbb664cd86e870bb81d46ca614770b50e))
- Remove decode() on error_message string
([`16bda20`](https://github.com/python-gitlab/python-gitlab/commit/16bda20514e036e51bef210b565671174cdeb637))
The integration tests failed because a test called 'decode()' on a string-type variable - the
GitLabException class handles byte-to-string conversion already in its __init__. This commit
removes the call to 'decode()' in the test.
``` Traceback (most recent call last): File "./tools/python_test_v4.py", line 801, in <module>
assert 'Retry later' in error_message.decode() AttributeError: 'str' object has no attribute
'decode'
Use python2 compatible syntax for super
(b08efcb)
api: Avoid parameter conflicts with python and gitlab
(4bd027a)
Provide another way to send data to gitlab with a new query_parameters argument. This parameter
can be used to explicitly define the dict of items to send to the server, so that **kwargs are
only used to specify python-gitlab specific parameters.
Closes #566 Closes #629
35a6d85)http_get always tries to interpret the retrieved data if the content-type is json. In some cases (artifact download for instance) this is not the expected behavior.
This patch changes http_get and download methods to always get the raw data without parsing.
Closes #683
d74ff50)Fixes #699
cb388d6)Closes #672
7969a78)Fixes #718 Fixes #731
8d1552a)Fixes #717 Fixes #727
6ad9da0)cli: Fix update value for key not working
(b766203)
cli: Print help and usage without config file
(6bb4d17)
Fixes #560
06e8ca8)c27fa48)Allow lines to be 88 chars long for flake8.
Bump package version to 1.10.0
(c7c8470)
Disable failing travis test
(515aa9a)
Move checks back to travis
(b764525)
Release tags to PyPI automatically
(3133b48)
Fixes #609
ci: Add automatic GitLab image pushes
(95c9b6d)
ci: Don't try to publish existing release
(b4e818d)
ci: Fix gitlab PyPI publish
(3e37df1)
ci: Rebuild test image, when something changed
(2fff260)
ci: Update the GitLab version in the test image
(c410699)
ci: Use reliable ci system
(724a672)
setup: Add 3.7 to supported python versions
(b1525c9)
tests: Add rate limit tests
(e216f06)
22b5082)ca014f8)The data passed to the JSON serializer must be a string with python 3. Document this in the exemples.
Fix #175
ea1eefe)Closes #752
Add ApplicationSettings API
(ab7d794)
Add builds-related API docs
(8e6a944)
Add deploy keys API
(ea089e0)
Add labales API
(31882b8)
Add licenses API
(4540614)
Add milestones API
(7411907)
Add missing =
(391417c)
Add missing requiredCreateAttrs
(b08d74a)
Add MR API
(5614a7c)
Add MR approvals in index
(0b45afb)
Add pipeline deletion
(2bb2571)
Add project members doc
(dcf31a4)
Commits API
(07c5594)
Crossref improvements
(6f9f42b)
Do not use the :option: markup
(368017c)
Document hooks API
(b21dca0)
Document projects API
(967595f)
Fix "required" attribute
(e64d0b9)
Fix invalid Raise attribute in docstrings
(95a3fe6)
Fork relationship API
(21f48b3)
Groups API documentation
(4d871aa)
Improve the pagination section
(29e2efe)
Issues API
(41cbc32)
Notes API
(3e026d2)
Project repository API
(71a2a4f)
Project search API
(e4cd04c)
Re-order api examples
(5d149a2)
Pipelines and Jobs and Protected Branches are out of order in contents and sometimes hard to
find when looking for examples.
Remove the build warning about _static
(764d3ca)
Remove v3 support
(7927663)
Repository files API
(f00340f)
Snippets API
(35b7f75)
Start a FAQ
(c305459)
System hooks API
(5c51bf3)
Tags API
(dd79eda)
Trigger_pipeline only accept branches and tags as ref
(d63748a)
Fixes #430
Fixes #798
d29a489)Fixes #606
ac2d65a)Fixes #635
f604b25)Having exactly 20 internal and 5 private projects in the group spent some time debugging this issue.
Hopefully that helped: https://github.com/python-gitlab/python-gitlab/issues/93
Imho should be definitely mention about all=True parameter.
Fixes #630
readme: Add docs build information
(6585c96)
readme: Add more info about commitlint, code-format
(286f703)
readme: Fix six url
(0bc30f8)
six URL was pointing to 404
bed8e1b)Fixes #660
Fixes #828
564de48)It adds a new endpoint which was released in the Gitlab CE 11.11.
Signed-off-by: Agustin Henze tin@redhat.com
Closes #801
90a3631)Closes #794
53f7de7)Offical GitLab API supports this for GitLab EE
Bump version to 1.9.0
(aaed448)
Get artifact by ref and job
(cda1174)
Implement artifacts deletion
(76b6e1f)
Closes #744
2abf9ab)done by using the retry-after header
Fixes #166
As of Gitlab 11.6 it is now possible to delete a pipeline - https://docs.gitlab.com/ee/api/pipelines.html#delete-a-pipeline
to MAINTAINER_ACCESS to follow GitLab 11.0 docs
See: https://docs.gitlab.com/ce/user/permissions.html#project-members-permissions
8ff8af0)Fixes #762
Always use latest version to test
(82b0fc6)
Increase speed by disabling the rate limit faster
(497f56c)
Minor test fixes
(3b523f4)
Update the tests for GitLab 11.11
(622854f)
Changes in GitLab make the functional tests fail:
auth: remove deprecated session auth
approval_rules endpoint for projects (2cef2bb4)fix: fix not working without auth provided
fix: fix not working without auth provided
cli: fix cli command user-project list
add methods to retrieve an individual project environment
get artifact by ref and job cda11745
add endpoint to get the variables of a pipeline
docs(setup): use proper readme on PyPI
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The ProjectUser class doesn't inherit from User anymore, and the GroupProject class doesn't inherit from Project anymore. The Gitlab API doesn't provi
The ProjectUser class doesn't inherit from User anymore, and the GroupProject class doesn't inherit from Project anymore. The Gitlab API doesn't provide the same set of features for these objects, so python-gitlab objects shouldn't try to workaround that.
You can create User or Project objects from ProjectUser and GroupProject objects using the id attribute:
for gr_project in group.projects.list():
# lazy object creation avoids a Gitlab API request
project = gl.projects.get(gr_project.id, lazy=True)
project.default_branch = 'develop'
project.save()
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
The development focus will be v4 from now on. v3 has been deprecated by GitLab and will disappear from python-gitlab at some point.
1.0.0 brings a stable python-gitlab API for the v4 Gitlab API. v3 is still used by default.
v4 is mostly compatible with the v3, but some important changes have been introduced. Make sure to read Switching to GitLab API v4.
The development focus will be v4 from now on. v3 has been deprecated by GitLab and will disappear from python-gitlab at some point.
Several methods have been deprecated in the gitlab.Gitlab class:
Initial support for the v4 API (experimental)
The support for v4 is stable enough to be tested, but some features might be broken. Please report issues to https://github.com/python-gitlab/python-gitlab/issues/
Be aware that the python-gitlab API for v4 objects might change in the next releases.
Warning
Consider defining explicitly which API version you want to use in the configuration files or in your gitlab.Gitlab instances. The default will change from v3 to v4 soon.
Several methods have been deprecated in the gitlab.Gitlab class:
credentials_auth() is deprecated and will be removed. Call auth().
token_auth() is deprecated and will be removed. Call auth().
set_url() is deprecated, create a new Gitlab instance if you need an updated URL.
set_token() is deprecated, use the private_token argument of the Gitlab constructor.
set_credentials() is deprecated, use the email and password arguments of the Gitlab constructor.
The service listing method (ProjectServiceManager.list()) now returns a python list instead of a JSON string.
The Key objects are deprecated in favor of the new DeployKey objects. They are exactly the same but the name makes more sense.
The projects attribute of Group objects is not a list of Project objects anymore. It is a Manager object giving access to GroupProject objects. To get the list of projects use:
group.projects.list()
Documentation: http://python-gitlab.readthedocs.io/en/stable/gl_objects/groups.html#examples
Related issue: https://github.com/python-gitlab/python-gitlab/issues/209
The Key objects are deprecated in favor of the new DeployKey objects. They are exactly the same but the name makes more sense.
Documentation: http://python-gitlab.readthedocs.io/en/stable/gl_objects/deploy_keys.html
Related issue: https://github.com/python-gitlab/python-gitlab/issues/212
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →