NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1082 most downloaded on PyPI
The python wrapper for the GitLab REST and GraphQL APIs.
Last release 6 days ago
28 Sep 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
125 releases · first in 2013
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
COPYING: Use the combined LGPGL and GPL license text. (b6e65dd)
renovate: Add a 7-day cooldown for updates (6bb4216)
f57c33b)aff7954)Detailed Changes: v8.5.0...v8.6.0
One column per quarter.
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
Typo (72134f5)
api: Allow ProjectMergeRequestDiscussionNote.resolved to be updated (b411e5a)
client: Retry fetching server version after an unknown result (046fbac)
a9c5d17)Correct error with backticks (e57559e)
discussions: Add example of resolving a single project merge request discussion note (2ef6452)
api: Add ListMixin to remaining *DiscussionNoteManagers (0e2347c)
client: Additionally handle retries for request timeouts (4e32439)
hooks: Support custom webhook template on project hooks (39dc990)
users: Allow updating only a user's email, username or name (0d2afb8)
57fd60c)Detailed Changes: v8.4.0...v8.5.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
3738bb2)2ab6d9f)Detailed Changes: v8.3.0...v8.4.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
api: Update CI/CD variable create and update attributes (849301b)
mixins: Register service account token classes in RotateMixin CLI actions (2cf430b)
feb6ced)Detailed Changes: v8.2.0...v8.3.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
e6669f9)api: Add support for project feature flags and feature flag user lists (be68285)
projects: Add optional parameter to set approval rule on all protected branches. (8d76028)
Detailed Changes: v8.1.0...v8.2.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
84ad3fd)api: Add support for order_by filter in runner jobs (d5dc73d)
api: Add support for sort filter in runner jobs (b117ee3)
Detailed Changes: v8.0.0...v8.1.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
6f0da67)Detailed Changes: v7.1.0...v8.0.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
4221195)614a74c)9dd62c3)c7c139b)Detailed Changes: v7.0.0...v7.1.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
22941ac)Detailed Changes: v6.5.0...v7.0.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
fb9693b)9357a37)2acac19)api: Add content_ref and dry_run_ref parameters to ProjectCiLintManager (e8d2538)
users: Implement 'skip_confirmation' in users 'emails' creation (2981730)
Detailed Changes: v6.4.0...v6.5.0
This release is published under the LGPL-3.0-or-later License.
This release is published under the LGPL-3.0-or-later License.
deps: Update actions/setup-python action to v6 (89cdb78)
deps: Update actions/stale action to v10 (1cc8cad)
deps: Update all non-major dependencies (0c56567)
deps: Update all non-major dependencies (06f62a2)
deps: Update all non-major dependencies (9d4ee07)
users: Implement missing arguments in users 'list' (99923d4)
users: Sort 'user list' arguments against documentation (99923d4)
Detailed Changes: v6.3.0...v6.4.0
_This release is published under the LGPL-3.0-or-later License._
This release is published under the LGPL-3.0-or-later License.
deps: Update actions/checkout action to v5 (36629a4)
deps: Update actions/download-artifact action to v5 (397cf39)
deps: Update all non-major dependencies (d40d5d2)
deps: Update all non-major dependencies (2fce144)
deps: Update all non-major dependencies (2dd2e8e)
deps: Update all non-major dependencies (bf7a60a)
deps: Update all non-major dependencies (18c946f)
Add sync method to force remote mirror updates (f3c6678)
api: Add missing ProjectJob list filters (5fe0e71)
api: Add missing ProjectPackageManager list filters (b1696be)
users: Implement support for 'admins' in administrators 'list' (aaed51c)
Detailed Changes: v6.2.0...v6.3.0
_This release is published under the LGPL-3.0-or-later License._
This release is published under the LGPL-3.0-or-later License.
2f20634)deps: Update all non-major dependencies (3b8fbf4)
deps: Update all non-major dependencies (be25c16)
deps: Update all non-major dependencies (9c095bd)
deps: Update all non-major dependencies (d25b33f)
deps: Update dependency furo to v2025 (b483ece)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v41 (d3f31a2)
stale: Improve formatting of stale message (0ef20d1)
stale: Increase operations-per-run to 500 (326e1a4)
api: Add ListMixin to ProjectIssueDiscussionNoteManager (f908f0e)
api: Add ListMixin to ProjectMergeRequestDiscussionNoteManager (865339a)
Detailed Changes: v6.1.0...v6.2.0
_This release is published under the LGPL-3.0-or-later License._
This release is published under the LGPL-3.0-or-later License.
Update to mypy 1.16.0 and resolve issues found (f734c58)
deps: Update all non-major dependencies (2bab8d4)
deps: Update all non-major dependencies (a87ba63)
deps: Update dependency requests to v2.32.4 [security] (ff579a6)
45dda50)api: Add listing user contributed projects (98c1307)
api: Add support for project tag list filters (378a836)
const: Add PLANNER_ACCESS constant (ba6f174)
groups: Add protectedbranches to group class (#3164, bfd31a8)
Detailed Changes: v6.0.0...v6.1.0
_This release is published under the LGPL-3.0-or-later License._
This release is published under the LGPL-3.0-or-later License.
Add reformat code commit to .git-blame-ignore-revs (a6ac939)
Reformat code with skip_magic_trailing_comma = true (2100aa4)
Remove trivial get methods in preparation for generic Get mixin (edd01a5)
Upgrade to sphinx 8.2.1 and resolve issues (d0b5ae3)
ci: Replace docs artifact with readthedocs previews (193c5de)
deps: Update all non-major dependencies (4fef9f6)
deps: Update all non-major dependencies (78c0c03)
deps: Update all non-major dependencies (ee6cba1)
deps: Update all non-major dependencies (e54516f)
deps: Update all non-major dependencies (159b958)
deps: Update all non-major dependencies (af137ca)
deps: Update all non-major dependencies (1a2a68c)
deps: Update all non-major dependencies (6ad4ce6)
deps: Update all non-major dependencies (f166928)
deps: Update all non-major dependencies (1a95981)
deps: Update all non-major dependencies (451d951)
deps: Update all non-major dependencies (41eb95d)
deps: Update all non-major dependencies (37ff25b)
deps: Update dependency black to v25 (e61157b)
deps: Update dependency isort to v6 (46dfc50)
deps: Update dependency jinja2 to v3.1.6 [security] (52bc585)
deps: Update dependency types-setuptools to v76 (1299440)
deps: Update dependency types-setuptools to v78 (20f83e3)
deps: Update dependency types-setuptools to v79 (2e51cd5)
deps: Update dependency types-setuptools to v80 (9ba9ac0)
deps: Update gitlab/gitlab-ee docker tag to v17.8.2-ee.0 (#3135, 051ea71)
deps: Update gitlab/gitlab-runner docker tag to v92098577 (#3142, 58e798e)
deps: Update gitlab/gitlab-runner docker tag to v92594782 (#3167, 795f83c)
deps: Update gitlab/gitlab-runner docker tag to v96856197 (#3190, 8c8fd84)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v40 (5a4acab)
deps: Update pre-commit hook psf/black to v25 (9040dbe)
deps: Update pre-commit hook pycqa/isort to v6 (c45e445)
deps: Update python-semantic-release/python-semantic-release action to v10 (f49d54e)
dev: Add option for serving docs locally (beb2f24)
Use get_all keyword arg instead of all in docstrings (f62dda7)
Use list(get_all=True) in documentation examples (f36614f)
api-usage: Fix GitLab API links to the publicly accessible URLs (f55fa15)
api-usage-graphql: Fix the example graphql query string (8dbdd7e)
job_token_scope: Fix typo/inconsistency (203bd92)
Adds member role methods (055557e)
api: Add iteration_id as boards create attribute (#3191, 938b0d9)
api: Add support for adding instance deploy keys (22be96c)
api: Add support for avatar removal (5edd2e6)
api: Add support for token self-rotation (da40e09)
api: Listmixin.list typing overload (6eee494)
api: Make RESTManager generic on RESTObject class (91c4f18)
api: Make RESTObjectList typing generic (befba35)
settings: Implement support for 'silent_mode_enabled' (a9163a9)
4e90c11)cbc613d)Detailed Changes: v5.6.0...v6.0.0
group: Add support for group level MR approval rules (`304bdd0`)
304bdd0)Detailed Changes: v5.5.0...v5.6.0
Add deprecation warning for mirror_pull functions (`7f6fd5c`)
Add deprecation warning for mirror_pull functions (7f6fd5c)
Relax typing constraints for response action (f430078)
tests: Catch deprecation warnings (0c1af08)
2411bff)Detailed Changes: v5.4.0...v5.5.0
Add deprecation warning for mirror_pull functions
(7f6fd5c)
Relax typing constraints for response action
(f430078)
tests: Catch deprecation warnings
(0c1af08)
Fix missing space in deprecation message (`ba75c31`)
e3cb806)Instead of using absolute ignore # type: ignore use a more specific ignores like # type: ignore[override]. This might help in the future where a new bug might be introduced and get ignored by a general ignore comment but not a more specific one.
Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
api: Return the new commit when calling cherry_pick (de29503)
files: Add optional ref parameter for cli project-file raw (python-gitlab#3032) (22f03bd)
The ef parameter was removed in python-gitlab v4.8.0. This will add ef back as an optional parameter for the project-file raw cli command.
pytest has changed the function argument name to start_path
0eb5eb0)The CI shows a warning. Use get_all=False to resolve issue.
accd5aa)Catch the DeprecationWarning in our test, as we expect it.
e8d6953)Currently the functional API test takes around 17 minutes to run. And the functional CLI test takes around 12 minutes to run.
Occasionally a job gets stuck and will sit until the default 360 minutes job timeout occurs.
Now have a 30 minute timeout for the 'functional' tests.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
671e711)mypy 1.14 has a change to Enum Membership Semantics: https://mypy.readthedocs.io/en/latest/changelog.html
Resolve the issues with Enum and typing, and update mypy to 1.14
e4673d8)Previously the 'job_with_artifact' fixture could run forever. Now give it up to 60 seconds to complete before failing.
2dda9dc)The latest gitlab-runner image does not have the gitlab-runner user and it causes our tests to fail.
Closes: #3091
fb07b5c)Currently the only way to manipulate the headers for a request is to use Gitlab.headers attribute. However, this makes it very concurrently unsafe because the Gitlab object can be shared between multiple requests at the same time.
Instead add a new keyword argument extra_headers which will update the headers dictionary with new values just before the request is sent.
For example, this can be used to download a part of a artifacts file using the Range header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests
Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
api: Add support for external status check (175b355)
api: Narrow down return type of download methods using typing.overload (44fd9dc)
Currently the download methods such as ProjectJob.artifacts have return type set to Optional[Union[bytes, Iterator[Any]]] which means they return either None or bytes or Iterator[Any].
However, the actual return type is determined by the passed streamed and iterator arguments. Using @typing.overload decorator it is possible to return a single type based on the passed arguments.
Add overloads in the following order to all download methods:
streamed=False and iterator=False return bytes. This is the default argument values therefore it should be first as it will be used to lookup default arguments. 2. If iterator=True return Iterator[Any]. This can be combined with both streamed=True and streamed=False. 3. If streamed=True and iterator=False return None. In this case action argument can be set to a callable that accepts bytes.Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
36d9b24)This is equivalent to the changes in 44fd9dc1176a2c5529c45cc3186c0e775026175e but for ProjectFileManager.raw method that I must have missed in the original commit.
Signed-off-by: Igor Ponomarev igor.ponomarev@collabora.com
Detailed Changes: v5.3.1...v5.4.0
api: Allow configuration of keep_base_url from file (`f4f7d7a`)
api: Allow configuration of keep_base_url from file (f4f7d7a)
registry-protection: Fix api url (8c1aaa3)
See: https://docs.gitlab.com/ee/api/container_repository_protection_rules.html#list-container-repository-protection-rules
Detailed Changes: v5.3.0...v5.3.1
deps: Update gitlab/gitlab-ee docker tag to v17.7.0-ee.0 (#3070, `62b7eb7`)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
aa07449)40af1c8)Detailed Changes: v5.2.0...v5.3.0
deps: Update all non-major dependencies (`1e02f23`)
deps: Update all non-major dependencies (1e02f23)
deps: Update all non-major dependencies (6532e8c)
deps: Update all non-major dependencies (8046387)
deps: Update codecov/codecov-action action to v5 (735efff)
deps: Update dependency commitizen to v4 (9306362)
deps: Update gitlab/gitlab-ee docker tag to v17.6.1-ee.0 (#3053, f2992ae)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
deps: Update pre-commit hook commitizen-tools/commitizen to v4 (a8518f1)
docs: Fix CHANGELOG tracebacks codeblocks (9fe372a)
With v5.1.0 CHANGELOG.md was updated that mangled v1.10.0 triple backtick codeblock Traceback output that made sphinx fail [1] with a non-zero return code.
The resulting docs appears to be processes as text after the failing line [2]. While reviewing other backtick codeblocks fix v1.8.0 [3] to the original traceback.
[1] https://github.com/python-gitlab/python-gitlab/actions/runs/12060608158/job/33631303063#step:5:204 [2] https://python-gitlab.readthedocs.io/en/v5.1.0/changelog.html#v1-10-0-2019-07-22 [3] https://python-gitlab.readthedocs.io/en/v5.0.0/changelog.html#id258
b70830d)288f39c)Detailed Changes: v5.1.0...v5.2.0
deps: Update all non-major dependencies (`9061647`)
deps: Update all non-major dependencies (9061647)
deps: Update gitlab/gitlab-ee docker tag to v17.6.0-ee.0 (#3044, 79113d9)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
deps: Update all non-major dependencies (62da12a)
deps: Update gitlab/gitlab-ee docker tag to v17.5.2-ee.0 (#3041, d39129b)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v39 (11458e0)
deps: Update all non-major dependencies (7e62136)
deps: Update dependency pytest-cov to v6 (ffa88b3)
deps: Update all non-major dependencies (d4b52e7)
deps: Update all non-major dependencies (541a7e3)
deps: Update gitlab/gitlab-ee docker tag to v17.5.1-ee.0 (8111f49)
api: Get single project approval rule (029695d)
cli: Enable token rotation via CLI (0cb8171)
const: Add new Planner role to access levels (bdc8852)
api: Support list and delete for group service accounts (#2963, 499243b)
files: Add support for more optional flags (f51cd52)
GitLab's Repository Files API supports additional flags that weren't implemented before. Notably, the "start_branch" flag is particularly useful, as previously one had to use the "project-branch" command alongside "project-file" to add a file on a separate branch.
[1] https://docs.gitlab.com/ee/api/repository_files.html
BREAKING CHANGE: As of python-gitlab 5.0.0, Python 3.8 is no longer supported. Python 3.9 or higher is required. (`9734ad4`)
Python 3.8 is End-of-Life (EOL) as of 2024-10 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0569/#lifespan
By dropping support for Python 3.8 and requiring Python 3.9 or higher it allows python-gitlab to take advantage of new features in Python 3.9, which are documented at: https://docs.python.org/3/whatsnew/3.9.html
Closes: #2968
BREAKING CHANGE: As of python-gitlab 5.0.0, Python 3.8 is no longer
supported. Python 3.9 or higher is required. (9734ad4)
Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com (1a68f1c)
Also fix annotations not working in Python 3.14 by using the annotation on the 'class' instead of on the 'instance'
Closes: #3013 (14d2a82)
chore(deps): update dependency ubuntu to v24 (6fda15d)
chore(deps): update all non-major dependencies (1e4326b)
chore(deps): update gitlab/gitlab-ee docker tag to v17.5.0-ee.0 (c02a392)
chore: add Python 3.13 as supported (#3012)
Mark that Python 3.13 is supported.
Use Python 3.13 for the Mac and Windows tests.
Also remove the 'py38' tox environment. We no longer support Python 3.8. (b565e78)
python-gitlab hasn't supported the GitLab v3 API since 2018. The last version of python-gitlab to support it was v1.4
Support was removed in:
commit fe89b949922c028830dd49095432ba627d330186 Author: Gauvain Pocentek gauvain@pocentek.net Date: Sat May 19 17:10:08 2018 +0200
Drop API v3 support
Drop the code, the tests, and update the documentation. ([`482f2fe`](https://github.com/python-gitlab/python-gitlab/commit/482f2fe6ccae9239b3a010a70969d8d887cdb6b6))
chore(deps): update all non-major dependencies (b3834dc)
chore(deps): update gitlab/gitlab-ee docker tag to v17.4.2-ee.0 (1cdfe40)
3739b5d)to_json() methodThis should get us to 100% test coverage on gitlab/base.py (f4bfe19)
Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com
Mark that Python 3.13 is supported.
Use Python 3.13 for the Mac and Windows tests.
Also remove the 'py38' tox environment. We no longer support Python 3.8.
14d2a82)Also fix annotations not working in Python 3.14 by using the annotation on the 'class' instead of on the 'instance'
Closes: #3013
python-gitlab hasn't supported the GitLab v3 API since 2018. The last version of python-gitlab to support it was v1.4
Support was removed in:
commit fe89b949922c028830dd49095432ba627d330186 Author: Gauvain Pocentek gauvain@pocentek.net
Date: Sat May 19 17:10:08 2018 +0200
Drop API v3 support
Drop the code, the tests, and update the documentation.
deps: Update all non-major dependencies
(1e4326b)
deps: Update all non-major dependencies
(b3834dc)
deps: Update dependency ubuntu to v24
(6fda15d)
deps: Update gitlab/gitlab-ee docker tag to v17.4.2-ee.0
(1cdfe40)
deps: Update gitlab/gitlab-ee docker tag to v17.5.0-ee.0
(c02a392)
Python 3.8 is End-of-Life (EOL) as of 2024-10 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0569/#lifespan
By dropping support for Python 3.8 and requiring Python 3.9 or higher it allows python-gitlab to take advantage of new features in Python 3.9, which are documented at: https://docs.python.org/3/whatsnew/3.9.html
Closes: #2968
BREAKING CHANGE: As of python-gitlab 5.0.0, Python 3.8 is no longer supported. Python 3.9 or higher is required.
to_json() method
(f4bfe19)This should get us to 100% test coverage on gitlab/base.py
chore(deps): update dependency pre-commit to v4
deps: Update all non-major dependencies
(c3efb37)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
0ee0e02)fix: raise GitlabHeadError in project.files.head() method
project.files.head() method (#3006)When an error occurs, raise GitlabHeadError in
project.files.head() method.
Closes: #3004 (9bf26df)
When an error occurs, raise GitlabHeadError in project.files.head() method.
Closes: #3004
chore(deps): update all non-major dependencies
ci: Do not rely on GitLab.com runner arch variables
(#3003,
c848d12)
files: Correctly raise GitlabGetError in get method
(190ec89)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
64eed5d)chore(deps): update all non-major dependencies (`ae132e7`)
chore(deps): update all non-major dependencies (ae132e7)
chore: update pylint to 3.3.1 and resolve issues (#2997)
pylint 3.3.1 appears to have added "too-many-positional-arguments" check with a value of 5.
I don't disagree with this, but we have many functions which exceed this value. We might think about converting some of positional arguments over to keyword arguments in the future. But that is for another time.
For now disable the check across the project. (a0729b8)
chore(deps): update dependency types-setuptools to v75 (a2ab54c)
chore(deps): update gitlab/gitlab-ee docker tag to v17.4.0-ee.0 (8601808)
chore(deps): update all non-major dependencies (10ee58a)
chore(deps): update gitlab/gitlab-ee docker tag to v17.3.2-ee.0 (5cd1ab2)
feat(build): build multi-arch images (#2987) (29f617d)
feat: introduce related_issues to merge requests (#2996) (174d992)
fix(api): head requests for projectfilemanager (#2977)
fix(api): head requests for projectfilemanager
Co-authored-by: Patrick Evans <patrick.evans@gehealthcare.com>
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com> (96a18b0)
Co-authored-by: Patrick Evans patrick.evans@gehealthcare.com
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
pylint 3.3.1 appears to have added "too-many-positional-arguments" check with a value of 5.
I don't disagree with this, but we have many functions which exceed this value. We might think about converting some of positional arguments over to keyword arguments in the future. But that is for another time.
For now disable the check across the project.
deps: Update all non-major dependencies
(ae132e7)
deps: Update all non-major dependencies
(10ee58a)
deps: Update dependency types-setuptools to v75
(a2ab54c)
deps: Update gitlab/gitlab-ee docker tag to v17.3.2-ee.0
(5cd1ab2)
deps: Update gitlab/gitlab-ee docker tag to v17.4.0-ee.0
(8601808)
fix(client): ensure type evaluations are postponed (`b41b2de`)
b41b2de)chore(pre-commit): add deps (`fe5e608`)
chore(pre-commit): add deps (fe5e608)
chore(deps): update all non-major dependencies (fac8bf9)
chore(deps): update dependency types-setuptools to v74 (bdfaddb)
chore(deps): update all non-major dependencies (88c7529)
b9f5c12)feat(client): make retries configurable in GraphQL (145870e)
feat(client): add retry handling to GraphQL client (8898c38)
feat(api): add exclusive GET attrs for /projects/:id/members (e637808)
feat: add a minimal GraphQL client (d6b1b0a)
feat(api): add exclusive GET attrs for /groups/:id/members (d44ddd2)
3235c48)deps: Update all non-major dependencies
(fac8bf9)
deps: Update all non-major dependencies
(88c7529)
deps: Update dependency types-setuptools to v74
(bdfaddb)
pre-commit: Add deps
(fe5e608)
b9f5c12)Add a minimal GraphQL client
(d6b1b0a)
api: Add exclusive GET attrs for /groups/:id/members
(d44ddd2)
api: Add exclusive GET attrs for /projects/:id/members
(e637808)
client: Add retry handling to GraphQL client
(8898c38)
client: Make retries configurable in GraphQL
(145870e)
3235c48)chore(release): track tags for renovate (`d600444`)
chore(release): track tags for renovate (d600444)
chore(deps): update python-semantic-release/upload-to-gh-release digest to 17c75b7 (12caaa4)
chore(deps): update dependency types-setuptools to v73 (d55c045)
chore(deps): update all non-major dependencies (2ade0d9)
chore(deps): update gitlab/gitlab-ee docker tag to v17.3.1-ee.0 (3fdd130)
chore(deps): update all non-major dependencies (0578bf0)
chore(deps): update gitlab/gitlab-ee docker tag to v17.3.0-ee.0 (e5a46f5)
chore(deps): update dependency myst-parser to v4 (930d4a2)
chore(deps): update dependency sphinx to v8 (cb65ffb)
chore(deps): update gitlab/gitlab-ee docker tag to v17.2.2-ee.0 (b2275f7)
chore(deps): update all non-major dependencies (31786a6)
There is an example about object attributes in the FAQ. It shows how to properly fetch all attributes of all projects, by using list() followed by a get(id) call.
Unfortunately this example used a wrong variable name, which caused it not to work and which could have made it slightly confusing to readers. This commit fixes that, by changing the variable name.
Now the example uses one variable for two Python objects. As they
correspond to the same GitLab object and the intended behavior is to
obtain that very object, just with all attributes, this is fine and is
probably what readers will find most useful in this context. (43a16ac)
Add the ability to trigger tests of project and group hooks.
Fixes #2924 (9353f54)
Before we allowed a maximum of around 15 seconds for the project-export. Often times the CI was failing with this value.
Change it to a maximum of around 30 seconds. (bdc155b)
deps: Update all non-major dependencies
(2ade0d9)
deps: Update all non-major dependencies
(0578bf0)
deps: Update all non-major dependencies
(31786a6)
deps: Update dependency myst-parser to v4
(930d4a2)
deps: Update dependency sphinx to v8
(cb65ffb)
deps: Update dependency types-setuptools to v73
(d55c045)
deps: Update gitlab/gitlab-ee docker tag to v17.2.2-ee.0
(b2275f7)
deps: Update gitlab/gitlab-ee docker tag to v17.3.0-ee.0
(e5a46f5)
deps: Update gitlab/gitlab-ee docker tag to v17.3.1-ee.0
(3fdd130)
deps: Update python-semantic-release/upload-to-gh-release digest to 17c75b7
(12caaa4)
release: Track tags for renovate
(d600444)
43a16ac)There is an example about object attributes in the FAQ. It shows how to properly fetch all attributes of all projects, by using list() followed by a get(id) call.
Unfortunately this example used a wrong variable name, which caused it not to work and which could have made it slightly confusing to readers. This commit fixes that, by changing the variable name.
Now the example uses one variable for two Python objects. As they correspond to the same GitLab object and the intended behavior is to obtain that very object, just with all attributes, this is fine and is probably what readers will find most useful in this context.
9353f54)Add the ability to trigger tests of project and group hooks.
Fixes #2924
bdc155b)Before we allowed a maximum of around 15 seconds for the project-export. Often times the CI was failing with this value.
Change it to a maximum of around 30 seconds.
chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v38 (`f13968b`)
chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v38 (f13968b)
chore(deps): update all non-major dependencies (f95ca26)
chore(deps): update dependency types-setuptools to v71 (d6a7dba)
chore(deps): update python-semantic-release/upload-to-gh-release digest to 0dcddac (eb5c6f7)
chore(deps): update gitlab/gitlab-ee docker tag to v17.2.1-ee.0 (d13a656)
chore(deps): update all non-major dependencies (7adc86b)
chore(deps): update python-semantic-release/upload-to-gh-release digest to e2355e1 (eb18552)
chore(deps): update all non-major dependencies (e820db0)
chore(ci): make pre-commit check happy
pre-commit incorrectly wants double back-quotes inside the code
section. Rather than fight it, just use single quotes. (67370d8)
64ae61e)67370d8)pre-commit incorrectly wants double back-quotes inside the code section. Rather than fight it, just use single quotes.
deps: Update all non-major dependencies
(f95ca26)
deps: Update all non-major dependencies
(7adc86b)
deps: Update all non-major dependencies
(e820db0)
deps: Update dependency types-setuptools to v71
(d6a7dba)
deps: Update gitlab/gitlab-ee docker tag to v17.2.1-ee.0
(d13a656)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v38
(f13968b)
deps: Update python-semantic-release/upload-to-gh-release digest to 0dcddac
(eb5c6f7)
deps: Update python-semantic-release/upload-to-gh-release digest to e2355e1
(eb18552)
64ae61e)test(fixtures): remove deprecated config option (`2156949`)
chore(deps): update gitlab/gitlab-ee docker tag to v17.1.2-ee.0 (6fedfa5)
chore(deps): update all non-major dependencies (4a2b213)
chore(ci): specify name of "stale" label
Saw the following error in the log: [#2618] Removing the label "Stale" from this issue... ##[error][#2618] Error when removing the label: "Label does not exist"
My theory is that the case doesn't match ("Stale" != "stale") and that is why it failed. Our label is "stale" so update this to match. Thought of changing the label name on GitHub but then would also require a change here to the "any-of-labels". So it seemed simpler to just change it here.
It is confusing though that it detected the label "stale", but then
couldn't delete it. (44f62c4)
If a stale label is manually applied, allow the issue or PR to be
closed by the stale job.
Previously it would require the stale label and to also have one of
'need info' or 'Waiting for response' labels added. (2ab88b2)
chore(ci): use codecov token when available (b74a6fb)
chore(deps): update python-semantic-release/upload-to-gh-release digest to fe6cc89 (3f3ad80)
chore(deps): update all non-major dependencies (0f59069)
chore: add show_caller argument to utils.warn()
This allows us to not add the caller's location to the UserWarning
message. (7d04315)
chore: use correct type-hint for die() (9358640)
chore(deps): update gitlab/gitlab-ee docker tag to v17.1.1-ee.0 (5e98510)
chore(deps): update python-semantic-release/upload-to-gh-release digest to c7c3b69 (23393fa)
chore(deps): update all non-major dependencies (cf87226)
sudo if modifying an objectAdd a warning about using sudo when saving.
Give an example of how to get an object, modify it, and then save
it using sudo
Closes: #532 (d509da6)
filter for updatingAdd a note about using filter when updating a variable.
Closes: #2835
Closes: #1387
Closes: #1125 (c378817)
feat(api): add support for project cluster agents (32dbc6f)
feat(api): add support for container registry protection rules (6d31649)
feat(api): add support for package protection rules (6b37811)
feat(api): add support for commit sequence (1f97be2)
closed_by()/related_merge_requests() use http_listThe closed_by() and related_merge_requests() API calls return
lists. So use the http_list() method.
This will also warn the user if only a subset of the data is returned. (de2e4dd)
participants() method use http_list()Previously it was using http_get() but the participants API
returns a list of participants. Also by using this then we will warn
if only a subset of the participants are returned.
Closes: #2913 (d065275)
NoneCo-authored-by: Nejc Habjan <hab.nejc@gmail.com> (51d8f88)
ref parameter optional in get raw file apiThe ref parameter was made optional in gitlab v13.11.0. (00640ac)
list does not return all entriesPreviously in the CLI, calls to list() would have get_all=False by
default. Therefore hiding the fact that not all items are being
returned if there were more than 20 items.
Added --no-get-all option to list actions. Along with the already
existing --get-all.
Closes: #2900 (e5a4379)
c307dd2)participants() method use http_list()
(d065275)Previously it was using http_get() but the participants API returns a list of participants. Also
by using this then we will warn if only a subset of the participants are returned.
Closes: #2913
closed_by()/related_merge_requests() use http_list
(de2e4dd)The closed_by() and related_merge_requests() API calls return lists. So use the http_list()
method.
This will also warn the user if only a subset of the data is returned.
list does not return all entries
(e5a4379)Previously in the CLI, calls to list() would have get_all=False by default. Therefore hiding the
fact that not all items are being returned if there were more than 20 items.
Added --no-get-all option to list actions. Along with the already existing --get-all.
Closes: #2900
None
(51d8f88)Co-authored-by: Nejc Habjan hab.nejc@gmail.com
ref parameter optional in get raw file api
(00640ac)The ref parameter was made optional in gitlab v13.11.0.
show_caller argument to utils.warn()
(7d04315)This allows us to not add the caller's location to the UserWarning message.
Saw the following error in the log: [#2618] Removing the label "Stale" from this issue... ##[error][#2618] Error when removing the label: "Label does not exist"
My theory is that the case doesn't match ("Stale" != "stale") and that is why it failed. Our label is "stale" so update this to match. Thought of changing the label name on GitHub but then would also require a change here to the "any-of-labels". So it seemed simpler to just change it here.
It is confusing though that it detected the label "stale", but then couldn't delete it.
2ab88b2)If a stale label is manually applied, allow the issue or PR to be closed by the stale job.
Previously it would require the stale label and to also have one of 'need info' or 'Waiting for
response' labels added.
ci: Use codecov token when available
(b74a6fb)
deps: Update all non-major dependencies
(4a2b213)
deps: Update all non-major dependencies
(0f59069)
deps: Update all non-major dependencies
(cf87226)
deps: Update gitlab/gitlab-ee docker tag to v17.1.1-ee.0
(5e98510)
deps: Update gitlab/gitlab-ee docker tag to v17.1.2-ee.0
(6fedfa5)
deps: Update python-semantic-release/upload-to-gh-release digest to c7c3b69
(23393fa)
deps: Update python-semantic-release/upload-to-gh-release digest to fe6cc89
(3f3ad80)
sudo if modifying an object
(d509da6)Add a warning about using sudo when saving.
Give an example of how to get an object, modify it, and then save it using sudo
Closes: #532
filter for updating
(c378817)Add a note about using filter when updating a variable.
Closes: #2835
Closes: #1387
Closes: #1125
api: Add support for commit sequence
(1f97be2)
api: Add support for container registry protection rules
(6d31649)
api: Add support for package protection rules
(6b37811)
api: Add support for project cluster agents
(32dbc6f)
c307dd2)chore(deps): update all non-major dependencies (`88de2f0`)
chore(deps): update all non-major dependencies (88de2f0)
chore(deps): update all non-major dependencies (a510f43)
chore(deps): update gitlab/gitlab-ee docker tag to v17.0.2-ee.0 (51779c6)
chore(deps): update python-semantic-release/upload-to-gh-release digest to 6b7558f (fd0f0b0)
chore(deps): update all non-major dependencies (d4fdf90)
chore(deps): update dependency types-setuptools to v70 (7767514)
chore(deps): update gitlab/gitlab-ee docker tag to v17.0.1-ee.0 (df0ff4c)
chore(deps): update python-semantic-release/upload-to-gh-release digest to 477a404 (02a551d)
chore(deps): update all non-major dependencies (d5de288)
chore: add a help message for gitlab project-key enable
Add some help text for gitlab project-key enable. This both adds
help text and shows how to use the new help feature.
Example:
$ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action:
{list,get,create,update,delete,enable}
Action to execute on the GitLab resource.
list List the GitLab resources
get Get a GitLab resource
create Create a GitLab resource
update Update a GitLab resource
delete Delete a GitLab resource
enable Enable a deploy key for the project (1291dbb)
Sort the list of CLI behavior-related args that are to be removed. (9b4b0ef)
feat(api): add support for latest pipeline (635f5a7)
feat: add --no-mask-credentials CLI argument
This gives the ability to not mask credentials when using the
--debug argument. (18aa1fc)
Now when registering a custom_action can add help text if desired.
Also delete the VerticalHelpFormatter as no longer needed. When the
help value is set to None or some other value, the actions will get
printed vertically. Before when the help value was not set the actions
would all get put onto one line. (9acd2d2)
9acd2d2)Now when registering a custom_action can add help text if desired.
Also delete the VerticalHelpFormatter as no longer needed. When the help value is set to None or
some other value, the actions will get printed vertically. Before when the help value was not set
the actions would all get put onto one line.
gitlab project-key enable
(1291dbb)Add some help text for gitlab project-key enable. This both adds help text and shows how to use
the new help feature.
Example:
$ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action: {list,get,create,update,delete,enable} Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource enable Enable a deploy key for the project
9b4b0ef)Sort the list of CLI behavior-related args that are to be removed.
deps: Update all non-major dependencies
(88de2f0)
deps: Update all non-major dependencies
(a510f43)
deps: Update all non-major dependencies
(d4fdf90)
deps: Update all non-major dependencies
(d5de288)
deps: Update dependency types-setuptools to v70
(7767514)
deps: Update gitlab/gitlab-ee docker tag to v17.0.1-ee.0
(df0ff4c)
deps: Update gitlab/gitlab-ee docker tag to v17.0.2-ee.0
(51779c6)
deps: Update python-semantic-release/upload-to-gh-release digest to 477a404
(02a551d)
deps: Update python-semantic-release/upload-to-gh-release digest to 6b7558f
(fd0f0b0)
--no-mask-credentials CLI argument
(18aa1fc)This gives the ability to not mask credentials when using the --debug argument.
635f5a7)chore(deps): update python-semantic-release/upload-to-gh-release digest to 673709c (`1b550ac`)
chore(deps): update python-semantic-release/upload-to-gh-release digest to 673709c (1b550ac)
chore(deps): update all non-major dependencies (4c7014c)
chore: update commit reference in git-blame-ignore-revs (d0fd5ad)
chore(cli): add ability to not add _id_attr as an argument
In some cases we don't want to have _id_attr as an argument.
Add ability to have it not be added as an argument. (2037352)
chore: create a CustomAction dataclass (61d8679)
chore: add an initial .git-blame-ignore-revs
This adds the .git-blame-ignore-revs file which allows ignoring
certain commits when doing a git blame --ignore-revs
Ignore the commit that requires keyword arguments for
register_custom_action()
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view (74db84c)
This makes it more obvious when reading the code what each argument is
for. (7270523)
We no longer support Python versions before 3.8. So it isn't needed
anymore. (d569128)
chore(deps): update dependency requests to v2.32.0 [security] (1bc788c)
chore(deps): update all non-major dependencies (ba1eec4)
chore(deps): update gitlab/gitlab-ee docker tag to v17 (5070d07)
chore(cli): on the CLI help show the API endpoint of resources
This makes it easier for people to map CLI command names to the API.
Looks like this:
$ gitlab --help
<snip>
The GitLab resource to manipulate.
application API endpoint: /applications
application-appearance
API endpoint: /application/appearance
application-settings
API endpoint: /application/settings
application-statistics
API endpoint: /application/statistics
<snip> (f1ef565)
Add help for the following standard operations:
For example: $ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action:
list
get
create
update
delete
enable
Action to execute on the GitLab resource.
list List the GitLab resources
get Get a GitLab resource
create Create a GitLab resource
update Update a GitLab resource
delete Delete a GitLab resource (5a4a940)
job.trace()Closes: #2808 (840572e)
Closes: #2821 (62fa271)
Co-authored-by: Cristiano Casella <cristiano.casella@seacom.it>
Co-authored-by: Nejc Habjan <hab.nejc@gmail.com> (623dac9)
Co-authored-by: Nejc Habjan <hab.nejc@siemens.com> (b187dea)
I don't think commit a2b8c8ccfb5d went far enough to enable usernames support. We create and edit a lot of approval rules based on an external service (similar to CODE_OWNERS), but only have the usernames available, and currently, have to look up each user to get their user ID to populate user_ids for .set_approvers() calls. Would very much like to skip the lookup and just send the usernames, which this change should allow.
See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
Signed-off-by: Jarod Wilson <jarod@redhat.com> (12d195a)
Update the minimum versions of the dependencies in the pyproject.toml file.
This is related to PR #2878 (37b5a70)
--id when enabling a deploy keyNo longer require --id when doing:
gitlab project-key enable
Now only the --project-id and --key-id are required. (98fc578)
fix: don't raise RedirectError for redirected HEAD requests (8fc13b9)
fix: handle large number of approval rules
Use iterator=True when going through the list of current approval
rules. This allows it to handle more than the default of 20 approval
rules.
Closes: #2825 (ef8f0e1)
Signed-off-by: Adrian DC <radian.dc@gmail.com> (33fbc14)
Don't raise RedirectError for redirected HEAD requests
(8fc13b9)
Handle large number of approval rules
(ef8f0e1)
Use iterator=True when going through the list of current approval rules. This allows it to handle
more than the default of 20 approval rules.
Closes: #2825
--id when enabling a deploy key
(98fc578)No longer require --id when doing: gitlab project-key enable
Now only the --project-id and --key-id are required.
37b5a70)Update the minimum versions of the dependencies in the pyproject.toml file.
This is related to PR #2878
33fbc14)Signed-off-by: Adrian DC radian.dc@gmail.com
74db84c)This adds the .git-blame-ignore-revs file which allows ignoring certain commits when doing a git blame --ignore-revs
Ignore the commit that requires keyword arguments for register_custom_action()
https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
62fa271)Closes: #2821
job.trace()
(840572e)Closes: #2808
We no longer support Python versions before 3.8. So it isn't needed anymore.
7270523)This makes it more obvious when reading the code what each argument is for.
Update commit reference in git-blame-ignore-revs
(d0fd5ad)
cli: Add ability to not add _id_attr as an argument
(2037352)
In some cases we don't want to have _id_attr as an argument.
Add ability to have it not be added as an argument.
5a4a940)Add help for the following standard operations: * list: List the GitLab resources * get: Get a GitLab resource * create: Create a GitLab resource * update: Update a GitLab resource * delete: Delete a GitLab resource
For example: $ gitlab project-key --help usage: gitlab project-key [-h] {list,get,create,update,delete,enable} ...
options: -h, --help show this help message and exit
action: list get create update delete enable Action to execute on the GitLab resource. list List the GitLab resources get Get a GitLab resource create Create a GitLab resource update Update a GitLab resource delete Delete a GitLab resource
f1ef565)This makes it easier for people to map CLI command names to the API.
Looks like this: $ gitlab --help <snip> The GitLab resource to manipulate. application API endpoint: /applications application-appearance API endpoint: /application/appearance application-settings API endpoint: /application/settings application-statistics API endpoint: /application/statistics <snip>
deps: Update all non-major dependencies
(4c7014c)
deps: Update all non-major dependencies
(ba1eec4)
deps: Update dependency requests to v2.32.0 [security]
(1bc788c)
deps: Update gitlab/gitlab-ee docker tag to v17
(5070d07)
deps: Update python-semantic-release/upload-to-gh-release digest to 673709c
(1b550ac)
12d195a)I don't think commit a2b8c8ccfb5d went far enough to enable usernames support. We create and edit a lot of approval rules based on an external service (similar to CODE_OWNERS), but only have the usernames available, and currently, have to look up each user to get their user ID to populate user_ids for .set_approvers() calls. Would very much like to skip the lookup and just send the usernames, which this change should allow.
See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
Signed-off-by: Jarod Wilson jarod@redhat.com
Co-authored-by: Cristiano Casella cristiano.casella@seacom.it
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
Co-authored-by: Nejc Habjan hab.nejc@siemens.com
build: Add "--no-cache-dir" to pip commands in Dockerfile
This would not leave cache files in the built docker image.
Additionally, also only build the wheel in the build phase.
On my machine, before this PR, size is 74845395; after this PR, size is
72617713. (4ef94c8)
chore(deps): update all non-major dependencies (4f338ae)
chore(deps): update gitlab/gitlab-ee docker tag to v16.11.2-ee.0 (9be48f0)
chore(deps): update dependency myst-parser to v3 (9289189)
chore(deps): update all non-major dependencies (65d0e65)
chore(deps): update dependency jinja2 to v3.1.4 [security] (8ea10c3)
chore(deps): update all non-major dependencies (1f0343c)
chore(deps): update gitlab/gitlab-ee docker tag to v16.11.1-ee.0 (1ed8d6c)
chore(deps): update all non-major dependencies (0e9f4da)
chore(deps): update gitlab/gitlab-ee docker tag to v16 (ea8c4c2)
chore(deps): update all non-major dependencies (d5b5fb0)
chore(deps): update dependency pytest-cov to v5 (db32000)
chore: update mypy to 1.9.0 and resolve one issue
mypy 1.9.0 flagged one issue in the code. Resolve the issue. Current
unit tests already check that a None value returns text/plain. So
function is still working as expected. (dd00bfc)
chore(deps): update dependency black to v24.3.0 [security] (f6e8692)
chore(deps): update all non-major dependencies (14a3ffe)
chore(deps): update all non-major dependencies (3c4dcca)
chore(deps): update all non-major dependencies (04c569a)
chore: add tox labels to enable running groups of environments
tox now has a feature of labels which allows running groups of
environments using the command tox -m LABEL_NAME. For example
tox -m lint which has been setup to run the linters.
Bumped the minimum required version of tox to be 4.0, which was
released over a year ago. (d7235c7)
Even though there isn't a Python 3.13 at this time, this is done for
the future. tox is already configured to just warn about missing
Python versions, but not fail if they don't exist. (679ddc7)
chore(deps): update python-semantic-release/python-semantic-release action to v9 (e11d889)
chore(deps): update all non-major dependencies (3c4b27e)
chore(deps): update dependency furo to v2024 (f6fd02d)
chore(deps): update dependency pytest to v8 (253babb)
chore(deps): update dependency pytest-docker to v3 (35d2aec)
chore: update version of black for pre-commit
The version of black needs to be updated to be in sync with what is
in requirements-lint.txt (3501716)
chore(deps): update all non-major dependencies (7dc2fa6)
chore(deps): update codecov/codecov-action action to v4 (d2be1f7)
chore: adapt style for black v24 (4e68d32)
chore(deps): update dependency black to v24 (f59aee3)
chore(deps): update all non-major dependencies (48726fd)
We have received multiple issues lately about this. Add it to the FAQ. (683ce72)
docs(README): tweak GitLab CI usage docs (d9aaa99)
docs: how to run smoke tests
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (2d1f487)
To correctly format a code block have to use :: (57dfd17)
Rotate token returns a dict. Change example to print the entire dict.
Closes: #2836 (c53e695)
Ref: #2823 (6d4bffb)
c631eeb)feat(job_token_scope): support Groups in job token allowlist API (#2816)
feat(job_token_scope): support job token access allowlist API
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
l.dwp.gov.uk>
Co-authored-by: Nejc Habjan <nejc.habjan@siemens.com> (2d1b749)
feat(cli): allow skipping initial auth calls (001e596)
feat(api): allow updating protected branches (#2771)
feat(api): allow updating protected branches
Closes #2390 (a867c48)
scope an ArrayAttribute in PipelineJobManagerList query params like 'scope' were not being handled correctly for pipeline/jobs endpoint. This change ensures multiple values are appended with '[]', resulting in the correct URL structure.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Background:
If one queries for pipeline jobs with scope=["failed", "success"]
One gets: GET /api/v4/projects/176/pipelines/1113028/jobs?scope=success&scope=failed
But it is supposed to get: GET /api/v4/projects/176/pipelines/1113028/jobs?scope[]=success&scope[]=failed
The current version only considers the last element of the list argument.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> (c5d0404)
The original bug was that the merge request identifier was used instead of the
approval rule identifier. The test didn't notice that because it used 1 for
all identifiers. Make these identifiers different so that a mixup will become
apparent. (c23e6bd)
Closes #2548 (b8b3849)
Previously would only go to the 2nd level of the stack for determining the offending filename and line number. When it should be showing the first filename outside of the python-gitlab source code. As we want it to show the warning for the user of the libraries code.
Update test to show it works as expected. (529f1fa)
fix(api): update manual job status when playing it (9440a32)
fix(cli): allow exclusive arguments as optional (#2770)
fix(cli): allow exclusive arguments as optional
The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.
fix(cli): inform argument parser that options are mutually exclusive
fix(cli): use correct exclusive options, add unit test
Closes #2769 (7ec3189)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (48a6705)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (06266ea)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (4bef473)
test(functional): enable bulk import feature flag before test (b81da2e)
test: don't use weak passwords
Newer versions of GitLab will refuse to create a user with a weak
password. In order for us to move to a newer GitLab version in testing
use a stronger password for the tests that create a user. (c64d126)
Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk> (f8283ae)
ee013fe)scope an ArrayAttribute in PipelineJobManager
(c5d0404)List query params like 'scope' were not being handled correctly for pipeline/jobs endpoint. This change ensures multiple values are appended with '[]', resulting in the correct URL structure.
Signed-off-by: Guilherme Gallo guilherme.gallo@collabora.com
Background: If one queries for pipeline jobs with scope=["failed", "success"]
One gets: GET /api/v4/projects/176/pipelines/1113028/jobs?scope=success&scope=failed
But it is supposed to get: GET /api/v4/projects/176/pipelines/1113028/jobs?scope[]=success&scope[]=failed
The current version only considers the last element of the list argument.
529f1fa)Previously would only go to the 2nd level of the stack for determining the offending filename and line number. When it should be showing the first filename outside of the python-gitlab source code. As we want it to show the warning for the user of the libraries code.
Update test to show it works as expected.
b8b3849)Closes #2548
api: Update manual job status when playing it
(9440a32)
The CLI takes its arguments from the RequiredOptional, which has three fields: required, optional, and exclusive. In practice, the exclusive options are not defined as either required or optional, and would not be allowed in the CLI. This changes that, so that exclusive options are also added to the argument parser.
fix(cli): inform argument parser that options are mutually exclusive
fix(cli): use correct exclusive options, add unit test
Closes #2769
c23e6bd)The original bug was that the merge request identifier was used instead of the approval rule
identifier. The test didn't notice that because it used 1 for all identifiers. Make these
identifiers different so that a mixup will become apparent.
4ef94c8)This would not leave cache files in the built docker image.
Additionally, also only build the wheel in the build phase.
On my machine, before this PR, size is 74845395; after this PR, size is 72617713.
Even though there isn't a Python 3.13 at this time, this is done for the future. tox is already configured to just warn about missing Python versions, but not fail if they don't exist.
labels to enable running groups of environments
(d7235c7)tox now has a feature of labels which allows running groups of environments using the command tox -m LABEL_NAME. For example tox -m lint which has been setup to run the linters.
Bumped the minimum required version of tox to be 4.0, which was released over a year ago.
mypy to 1.9.0 and resolve one issue
(dd00bfc)mypy 1.9.0 flagged one issue in the code. Resolve the issue. Current unit tests already check that a
None value returns text/plain. So function is still working as expected.
black for pre-commit
(3501716)The version of black needs to be updated to be in sync with what is in requirements-lint.txt
deps: Update all non-major dependencies
(4f338ae)
deps: Update all non-major dependencies
(65d0e65)
deps: Update all non-major dependencies
(1f0343c)
deps: Update all non-major dependencies
(0e9f4da)
deps: Update all non-major dependencies
(d5b5fb0)
deps: Update all non-major dependencies
(14a3ffe)
deps: Update all non-major dependencies
(3c4dcca)
deps: Update all non-major dependencies
(04c569a)
deps: Update all non-major dependencies
(3c4b27e)
deps: Update all non-major dependencies
(7dc2fa6)
deps: Update all non-major dependencies
(48726fd)
deps: Update codecov/codecov-action action to v4
(d2be1f7)
deps: Update dependency black to v24
(f59aee3)
deps: Update dependency black to v24.3.0 [security]
(f6e8692)
deps: Update dependency furo to v2024
(f6fd02d)
deps: Update dependency jinja2 to v3.1.4 [security]
(8ea10c3)
deps: Update dependency myst-parser to v3
(9289189)
deps: Update dependency pytest to v8
(253babb)
deps: Update dependency pytest-cov to v5
(db32000)
deps: Update dependency pytest-docker to v3
(35d2aec)
deps: Update gitlab/gitlab-ee docker tag to v16
(ea8c4c2)
deps: Update gitlab/gitlab-ee docker tag to v16.11.1-ee.0
(1ed8d6c)
deps: Update gitlab/gitlab-ee docker tag to v16.11.2-ee.0
(9be48f0)
deps: Update python-semantic-release/python-semantic-release action to v9
(e11d889)
683ce72)We have received multiple issues lately about this. Add it to the FAQ.
c53e695)Rotate token returns a dict. Change example to print the entire dict.
Closes: #2836
2d1f487)Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
6d4bffb)Ref: #2823
To correctly format a code block have to use ::
d9aaa99)Closes #2390
cli: Allow skipping initial auth calls
(001e596)
job_token_scope: Support Groups in job token allowlist API
(#2816,
2d1b749)
Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
l.dwp.gov.uk> Co-authored-by: Nejc Habjan nejc.habjan@siemens.com
c64d126)Newer versions of GitLab will refuse to create a user with a weak password. In order for us to move to a newer GitLab version in testing use a stronger password for the tests that create a user.
48a6705)Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
06266ea)Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
Update api tests for GL 16.10
(4bef473)
Make sure we're testing python-gitlab functionality, make sure we're not awaiting on Gitlab Async functions - Decouple and improve test stability
Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
Update tests for gitlab 16.8 functionality
(f8283ae)
use programmatic dates for expires_at in tokens tests - set PAT for 16.8 into tests
Signed-off-by: Tim Knight tim.knight1@engineering.digital.dwp.gov.uk
chore(deps): update all non-major dependencies (`550f935`)
chore(deps): update all non-major dependencies (550f935)
chore(deps): update pre-commit hook pycqa/flake8 to v7 (9a199b6)
chore(deps): update dependency jinja2 to v3.1.3 [security] (880913b)
chore(deps): update dependency flake8 to v7 (20243c5)
chore(deps): update all non-major dependencies (cbc13a6)
chore(ci): align upload and download action versions (dcca59d)
chore(deps): update actions/upload-artifact action to v4 (7114af3)
chore(ci): add Python 3.13 development CI job
Add a job to test the development versions of Python 3.13. (ff0c11b)
369a595)Those changes implements 'GET /projects/:id/merge_requests/:merge_request_iid/reviewers' gitlab API call.
Naming for call is not reviewers because reviewers atribute already presen in merge request response (adbd90c)
feat(api): support access token rotate API (b13971d)
feat(api): support single resource access token get API (dae9e52)
@ notationSupport binary files being used in the CLI with arguments using the
@ notation. For example --avatar @/path/to/avatar.png
Also explicitly catch the common OSError exception, which is the parent exception for things like: FileNotFoundError, PermissionError and more exceptions.
Remove the bare exception handling. We would rather have the full traceback of any exceptions that we don't know about and add them later if needed.
Closes: #2752 (57749d4)
@ notation
(57749d4)Support binary files being used in the CLI with arguments using the @ notation. For example
--avatar @/path/to/avatar.png
Also explicitly catch the common OSError exception, which is the parent exception for things like: FileNotFoundError, PermissionError and more exceptions.
Remove the bare exception handling. We would rather have the full traceback of any exceptions that we don't know about and add them later if needed.
Closes: #2752
ff0c11b)Add a job to test the development versions of Python 3.13.
ci: Align upload and download action versions
(dcca59d)
deps: Update actions/upload-artifact action to v4
(7114af3)
deps: Update all non-major dependencies
(550f935)
deps: Update all non-major dependencies
(cbc13a6)
deps: Update all non-major dependencies
(369a595)
deps: Update dependency flake8 to v7
(20243c5)
deps: Update dependency jinja2 to v3.1.3 [security]
(880913b)
deps: Update pre-commit hook pycqa/flake8 to v7
(9a199b6)
adbd90c)Those changes implements 'GET /projects/:id/merge_requests/:merge_request_iid/reviewers' gitlab API call. Naming for call is not reviewers because reviewers atribute already presen in merge request response
chore(deps): update all non-major dependencies (`d7bdb02`)
chore(deps): update all non-major dependencies (d7bdb02)
chore(deps): update actions/stale action to v9 (c01988b)
chore(deps): update all non-major dependencies (9e067e5)
chore(deps): update actions/setup-python action to v5 (fad1441)
chore(deps): update all non-major dependencies (bb2af7b)
chore(deps): update all non-major dependencies (5ef1b4a)
chore(deps): update dependency types-setuptools to v69 (de11192)
2b6da6e)feat(api): add support for the Draft notes API (#2728)
feat(api): add support for the Draft notes API
fix(client): handle empty 204 reponses in PUT requests (ebf9d82)
Add a --no-ssl-verify option to disable SSL verification
Closes: #2714 (3fe9fa6)
3fe9fa6)Add a --no-ssl-verify option to disable SSL verification
Closes: #2714
deps: Update actions/setup-python action to v5
(fad1441)
deps: Update actions/stale action to v9
(c01988b)
deps: Update all non-major dependencies
(d7bdb02)
deps: Update all non-major dependencies
(9e067e5)
deps: Update all non-major dependencies
(bb2af7b)
deps: Update all non-major dependencies
(5ef1b4a)
deps: Update dependency types-setuptools to v69
(de11192)
2b6da6e)feat(api): add support for the Draft notes API
fix(client): handle empty 204 reponses in PUT requests
chore(deps): update all non-major dependencies (`8aeb853`)
chore(deps): update all non-major dependencies (8aeb853)
chore(deps): update dessant/lock-threads action to v5 (f4ce867)
chore(deps): update all non-major dependencies (9fe2335)
chore(deps): update all non-major dependencies (91e66e9)
chore(deps): update all non-major dependencies (d0546e0)
https://docs.gitlab.com/ee/api/pipelines.html (4954bbc)
Added UploadMixin in mixin module
Added UploadMixin dependency for Project, ProjectWiki, GroupWiki
Added api tests for wiki upload
Added unit test for mixin
Added docs sections to wikis.rst (7b864b8)
deps: Update all non-major dependencies
(8aeb853)
deps: Update all non-major dependencies
(9fe2335)
deps: Update all non-major dependencies
(91e66e9)
deps: Update all non-major dependencies
(d0546e0)
deps: Update dessant/lock-threads action to v5
(f4ce867)
4954bbc)https://docs.gitlab.com/ee/api/pipelines.html
Added UploadMixin in mixin module Added UploadMixin dependency for Project, ProjectWiki, GroupWiki Added api tests for wiki upload Added unit test for mixin Added docs sections to wikis.rst
chore(ci): add release id to workflow step (`9270e10`)
chore(ci): add release id to workflow step (9270e10)
chore(deps): update all non-major dependencies (32954fb)
The examples which show usage of new runner registration api endpoint
are missing commas. This change adds the missing commas. (b1b2edf)
b928639)b928639)b1b2edf)The examples which show usage of new runner registration api endpoint are missing commas. This change adds the missing commas.
add Merge Request merge_status and detailed_merge_status values as constants (`e18a424`)
e18a424)c6c012b)Add source label to container image
(7b19278)
CHANGELOG: Re-add v4.0.0 changes using old format
(258a751)
CHANGELOG: Revert python-semantic-release format change
(b5517e0)
deps: Update all non-major dependencies
(bf68485)
fd7bbfc)e18a424)Support for the deprecated as_list argument in list() calls has been removed. Use iterator instead. (`9b6d89e`)
1611d78)2a69c0e)5f46cfd)59d6a88)d900910)40a102d)8d2d297)016d90c)e15349c)31c3c5e)118ce42)45b8930)71fca8c)gitlab.const can no longer be imported globally from gitlab.
Import them from gitlab.const instead. (e4a1f6e)as_list argument in
list() calls has been removed. Use iterator instead. (9b6d89e)lint() method is no longer available.
Use ci_lint.create() instead. (0b17a2d)project.artifact() method is no longer available.
Use project.artifacts.raw() instead. (90134c9)project.artifacts() method is no longer available.
Use project.artifacts.download() instead. (42639f3)group.add_ldap_group_link() and group.delete_ldap_group_link()
methods are no longer available. Use group.ldap_group_links.create() and group.ldap_group_links.delete()
instead. (5c8b7c1)project.transfer_project() method is no longer available.
Use project.transfer() instead. (27ed490)--all option is no longer available in the CLI. Use --get-all instead. (e9d48cf)058d5a5)cli: Add _from_parent_attrs to user-project manager
(#2558,
016d90c)
cli: Fix action display in --help when there are few actions
(b22d662)
fixes #2656
--all option in favor of --get-all
(e9d48cf)BREAKING CHANGE: The --all option is no longer available in the CLI. Use --get-all instead.
client: Support empty 204 responses in http_patch
(e15349c)
snippets: Allow passing list of files
(31c3c5e)
Add package pipelines API link
(2a2404f)
Change _update_uses to _update_method and use an Enum
(7073a2d)
Change the name of the _update_uses attribute to _update_method and store an Enum in the
attribute to indicate which type of HTTP method to use. At the moment it supports POST and
PUT. But can in the future support PATCH.
Closes: #2625
3b8939d)Fixes issue with CI having error: AttributeError: cython_sources
Closes: #2624
ci: Adapt release workflow and config for v8
(827fefe)
ci: Fix pre-commit deps and python version
(1e7f257)
ci: Follow upstream config for release build_command
(3e20a76)
ci: Remove Python 3.13 dev job
(e8c50f2)
ci: Update release build for python-semantic-release v8
(#2692,
bf050d1)
deps: Bring furo up to date with sphinx
(a15c927)
deps: Bring myst-parser up to date with sphinx 7
(da03e9c)
deps: Pin pytest-console-scripts for 3.7
(6d06630)
deps: Update actions/checkout action to v3
(e2af1e8)
deps: Update actions/checkout action to v4
(af13914)
deps: Update actions/setup-python action to v4
(e0d6783)
deps: Update actions/upload-artifact action to v3
(b78d6bf)
deps: Update all non-major dependencies
(1348a04)
deps: Update all non-major dependencies
(ff45124)
deps: Update all non-major dependencies
(0d49164)
deps: Update all non-major dependencies
(6093dbc)
deps: Update all non-major dependencies
(bb728b1)
deps: Update all non-major dependencies
(9083787)
deps: Update all non-major dependencies
(b6a3db1)
deps: Update all non-major dependencies
(16f2d34)
deps: Update all non-major dependencies
(5b33ade)
deps: Update all non-major dependencies
(3732841)
deps: Update all non-major dependencies
(511f45c)
deps: Update all non-major dependencies
(d4a7410)
deps: Update all non-major dependencies
(12846cf)
deps: Update all non-major dependencies
(33d2aa2)
deps: Update all non-major dependencies
(5ff56d8)
deps: Update all non-major dependencies
(7586a5c)
deps: Update all non-major dependencies to v23.9.1
(a16b732)
deps: Update dependency build to v1
(2e856f2)
deps: Update dependency commitizen to v3.10.0
(becd8e2)
deps: Update dependency pylint to v3
(491350c)
deps: Update dependency pytest-docker to v2
(b87bb0d)
deps: Update dependency setuptools to v68
(0f06082)
deps: Update dependency sphinx to v7
(2918dfd)
deps: Update dependency types-setuptools to v68
(bdd4eb6)
deps: Update dependency ubuntu to v22
(8865552)
deps: Update pre-commit hook commitizen-tools/commitizen to v3.10.0
(626c2f8)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v36
(db58cca)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v37
(b4951cd)
deps: Update pre-commit hook pycqa/pylint to v3
(0f4a346)
deps: Update relekang/python-semantic-release action to v8
(c57c85d)
helpers: Fix previously undetected flake8 issue
(bf8bd73)
rtd: Use readthedocs v2 syntax
(6ce2149)
New linting package update detected the issue.
fe7a971)expires_at is now required Upstream MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124964
45b8930)BREAKING CHANGE: python-gitlab now explicitly passes auth to requests, meaning it will only read netrc credentials if no token is provided, fixing a bug where netrc credentials took precedence over OAuth tokens. This also affects the CLI, where all environment variables now take precedence over netrc files.
118ce42)Added iteration to issue and group filters
(8d2d297)
Officially support Python 3.12
(2a69c0e)
Remove support for Python 3.7, require 3.8 or higher
(058d5a5)
Python 3.8 is End-of-Life (EOL) as of 2023-06-27 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0537/
By dropping support for Python 3.7 and requiring Python 3.8 or higher it allows python-gitlab to take advantage of new features in Python 3.8, which are documented at: https://docs.python.org/3/whatsnew/3.8.html
BREAKING CHANGE: As of python-gitlab 4.0.0, Python 3.7 is no longer supported. Python 3.8 or higher is required.
Use requests AuthBase classes
(5f46cfd)
api: Add optional GET attrs for /projects/:id/ci/lint
(40a102d)
api: Add ProjectPackagePipeline
(5b4addd)
Add ProjectPackagePipeline, which is scheduled to be included in GitLab 16.0
api: Add support for job token scope settings
(59d6a88)
api: Add support for new runner creation API
(#2635,
4abcd17)
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
api: Support project remote mirror deletion
(d900910)
client: Mask tokens by default when logging
(1611d78)
packages: Allow uploading bytes and files
(61e0fae)
This commit adds a keyword argument to GenericPackageManager.upload() to allow uploading bytes and file-like objects to the generic package registry. That necessitates changing file path to be a keyword argument as well, which then cascades into a whole slew of checks to not allow passing both and to not allow uploading file-like objects as JSON data.
Closes https://github.com/python-gitlab/python-gitlab/issues/1815
d054917)This commit adds support for the “new” alias for filepath: direct_asset_path (added in 15.10) in
release links API.
artifact()in favor of artifacts.raw()
(90134c9)BREAKING CHANGE: The deprecated project.artifact() method is no longer available. Use
project.artifacts.raw() instead.
artifacts()in favor of artifacts.download()
(42639f3)BREAKING CHANGE: The deprecated project.artifacts() method is no longer available. Use
project.artifacts.download() instead.
71fca8c)BREAKING CHANGE: python-gitlab now stores metadata in pyproject.toml as per PEP 621, with setup.py removed. pip version v21.1 or higher is required if you want to perform an editable install.
e4a1f6e)BREAKING CHANGE: Constants defined in gitlab.const can no longer be imported globally from
gitlab. Import them from gitlab.const instead.
5c8b7c1)BREAKING CHANGE: The deprecated group.add_ldap_group_link() and group.delete_ldap_group_link()
methods are no longer available. Use group.ldap_group_links.create() and
group.ldap_group_links.delete() instead.
lint()in favor of ci_lint.create()
(0b17a2d)BREAKING CHANGE: The deprecated lint() method is no longer available. Use ci_lint.create()
instead.
as_list support is removed.
(9b6d89e)In list() calls support for the as_list argument has been removed. as_list was previously
deprecated and now the use of iterator will be required if wanting to have same functionality as
using as_list
BREAKING CHANGE: Support for the deprecated as_list argument in list() calls has been removed.
Use iterator instead.
project.transfer_project() in favor of project.transfer()
(27ed490)BREAKING CHANGE: The deprecated project.transfer_project() method is no longer available. Use
project.transfer() instead.
Warnings were being raised. Resolve those warnings.
3074f52)urllib3>=2 now checks for expected content length. Also codes 204 and 304 are set to expect a content length of 0 [1]
So in the unit tests stop setting content to return in these situations.
[1] https://github.com/urllib3/urllib3/blob/88a707290b655394aade060a8b7eaee83152dc8b/src/urllib3/response.py#L691-L693
a788cff)advanced: Python-gitlab now explicitly passes auth to requests, meaning it will only read netrc credentials if no token is provided, fixing a bug where netrc credentials took precedence over OAuth tokens. This also affects the CLI, where all environment variables now take precedence over netrc files.
build: Python-gitlab now stores metadata in pyproject.toml as per PEP 621, with setup.py removed. pip version v21.1 or higher is required if you want to perform an editable install.
Add support for select="package_file" in package upload (`3a49f09`)
Update copyright year to include 2023
(511c6e5)
Update sphinx from 5.3.0 to 6.2.1
(c44a290)
ci: Use OIDC trusted publishing for pypi.org
(#2559,
7be09e5)
chore(ci): use OIDC trusted publishing for pypi.org
chore(ci): explicitly install setuptools in tests
deps: Update all non-major dependencies
(e3de6ba)
deps: Update dependency commitizen to v3
(784d59e)
deps: Update dependency myst-parser to v1
(9c39848)
deps: Update dependency requests-toolbelt to v1
(86eba06)
deps: Update dependency types-setuptools to v67
(c562424)
deps: Update pre-commit hook commitizen-tools/commitizen to v3
(1591e33)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v35
(8202e3f)
e0f6f18)select="package_file" in package upload
(3a49f09)Add ability to use select="package_file" when uploading a generic package as described in:
https://docs.gitlab.com/ee/user/packages/generic_packages/index.html
Closes: #2557
a2b8c8c)This can be used instead of 'user_ids'
See: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rule
348f56e)projects: Allow importing additional items from GitHub (`ce84f2e`)
ce84f2e)self endpoint (19b38bd)6e5ef55)4afeaff)f711d9e)allow_force_push for protected branch (929e07d)8bf53c8)76063c3)parent_id in import_group (90f96ac)4f7c784)33a04e7)ee5f444)parent_id in import_group
(90f96ac)This will also fix other use cases where an integer is passed in to MultipartEncoder.
Added unit tests to show it works.
Closes: #2506
Co-authored-by: Nejc Habjan hab.nejc@gmail.com
cli: Display items when iterator is returned
(33a04e7)
cli: Warn user when no fields are displayed
(8bf53c8)
client: Properly parse content-type when charset is present
(76063c3)
fe334c9)See https://www.contributor-covenant.org/version/2/1/code_of_conduct/
0867564)Add a unit test for Python 3.12. This will use the latest version of Python 3.12 that is available from https://github.com/actions/python-versions/
At this time it is 3.12.0-alpha.4 but will move forward over time until the final 3.12 release and updates. So 3.12.0, 3.12.1, ... will be matched.
For users who use tox having pre-commit as part of the default environment list is redundant as
it will run the same tests again that are being run in other environments. For example: black,
flake8, pylint, and more.
prepare_send_data
(f2b5e4f)I found the tuple of three values confusing. So instead use a dataclass to return the three values. It is still confusing but a little bit less so.
Also add some unit tests
.github: Actually make PR template the default
(7a8a862)
ci: Wait for all coverage reports in CI status
(511764d)
contributing: Refresh development docs
(d387d91)
deps: Update actions/stale action to v8
(7ac4b86)
deps: Update all non-major dependencies
(8b692e8)
deps: Update all non-major dependencies
(2f06999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nejc Habjan nejc.habjan@siemens.com
Update the dependency versions: black: 23.1.0
commitizen: 2.40.0
They needed to be updated together as just updating black caused a dependency conflict.
Updated files by running black and committing the changes.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
deps: Update dependency furo to v2023
(7a1545d)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
9c24657)Update the requirements-* files.
In order to update mypy==1.0.0 we need to also update responses==0.22.0
Fix one issue found by mypy
Leaving updates for precommit to be done in a separate commit by someone.
deps: Update pre-commit hook psf/black to v23
(217a787)
github: Add default pull request template
(bf46c67)
pre-commit: Bumping versions
(e973729)
renovate: Bring back custom requirements pattern
(ae0b21c)
renovate: Do not ignore tests dir
(5b8744e)
renovate: Swith to gitlab-ee
(8da48ee)
setup: Depend on typing-extensions for 3.7 until EOL
(3abc557)
3d7ca1c)docs: fix update badge behaviour
Earlier: badge.image_link = new_link
Now: badge.image_url = new_image_url badge.link_url = new_link_url
advanced: Clarify netrc, proxy behavior with requests
(1da7c53)
advanced: Fix typo in Gitlab examples
(1992790)
objects: Fix typo in pipeline schedules
(3057f45)
Add resource_weight_event for ProjectIssue
(6e5ef55)
backends: Use PEP544 protocols for structural subtyping
(#2442,
4afeaff)
The purpose of this change is to track API changes described in https://github.com/python-gitlab/python-gitlab/blob/main/docs/api-levels.rst, for example, for package versioning and breaking change announcements in case of protocol changes.
This is MVP implementation to be used by #2435.
allow_force_push for protected branch
(929e07d)For the CLI: add allow_force_push as an optional argument for creating a protected branch.
API reference: https://docs.gitlab.com/ee/api/protected_branches.html#protect-repository-branches
Closes: #2466
In order to support some new API calls we need to support the HTTP PATCH method.
Closes: #2469
objects: Support fetching PATs via id or self endpoint
(19b38bd)
projects: Allow importing additional items from GitHub
(ce84f2e)
2dd177b)functional: Clarify MR fixture factory name
(d8fd1a8)
meta: Move meta suite into unit tests
(847004b)
They're always run with it anyway, so it makes no difference.
deps: Bump requests-toolbelt to fix deprecation warning (`faf842e`)
9322db6)dced76a)043de2d)5f8b8f5)865fa41)b6c0872)91a665f)ef5feb4)from_config (#2392) (e88d34e)50a0301)585e3a8)3f86d36)faf842e)44f05dc)5579750)4c9a072)Change return value to "None" in case getattr returns None to prevent error
(3f86d36)
Typo fixed in docs
(ee5f444)
Use the ProjectIterationManager within the Project object
(44f05dc)
The Project object was previously using the GroupIterationManager resulting in the incorrect API endpoint being used. Utilize the correct ProjectIterationManager instead.
Resolves #2403
api: Make description optional for releases
(5579750)
client: Regression - do not automatically get_next if page=# and
(585e3a8)
deps: Bump requests-toolbelt to fix deprecation warning
(faf842e)
If a caller calls a list() method with both iterator=True (or as_list=False) and page=X then
emit a UserWarning as the options are mutually exclusive.
Add docs for schedule pipelines
(9a9a6a9)
Add test, docs, and helper for 409 retries
(3e1c625)
Make backends private
(1e629af)
Remove tox envdir values
(3c7c7fc)
tox > 4 no longer will re-use the tox directory :( What this means is that with the previous config if you ran: $ tox -e mypy; tox -e isort; tox -e mypy It would recreate the tox environment each time :(
By removing the envdir values it will have the tox environments in separate directories and not
recreate them.
The have an FAQ entry about this: https://tox.wiki/en/latest/upgrading.html#re-use-of-environments
Update attributes for create and update projects
(aa44f2a)
Use SPDX license expression in project metadata
(acb3a4a)
ci: Complete all unit tests even if one has failed
(#2438,
069c6c3)
deps: Update actions/download-artifact action to v3
(64ca597)
deps: Update actions/stale action to v7
(76eb024)
deps: Update all non-major dependencies
(ea7010b)
deps: Update all non-major dependencies
(122988c)
deps: Update all non-major dependencies
(49c0233)
deps: Update all non-major dependencies
(10c4f31)
deps: Update all non-major dependencies
(bbd01e8)
deps: Update all non-major dependencies
(6682808)
deps: Update all non-major dependencies
(1816107)
deps: Update all non-major dependencies
(21e767d)
deps: Update dessant/lock-threads action to v4
(337b25c)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v34.48.4
(985b971)
deps: Update pre-commit hook pycqa/flake8 to v6
(82c61e1)
tox: Ensure test envs have all dependencies
(63cf4e4)
4c9a072)Add keep_base_url when getting configuration from file
(50a0301)
Add resource iteration events (see https://docs.gitlab.com/ee/api/resource_iteration_events.html)
(ef5feb4)
Allow filtering pipelines by source
(b6c0872)
See: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines Added in GitLab 14.3
Allow passing kwargs to Gitlab class when instantiating with from_config
(#2392,
e88d34e)
api: Add support for bulk imports API
(043de2d)
api: Add support for resource groups
(5f8b8f5)
api: Support listing pipelines triggered by pipeline schedules
(865fa41)
client: Automatically retry on HTTP 409 Resource lock
(dced76a)
Fixes: #2325
client: Bootstrap the http backends concept
(#2391,
91a665f)
group: Add support for group restore API
(9322db6)
Migrate MultipartEncoder to RequestsBackend
(#2421,
43b369f)
Moving RETRYABLE_TRANSIENT_ERROR_CODES to const
(887852d)
groups: Add LDAP link manager and deprecate old API endpoints (`3a61f60`)
1020ce9)3a61f60)ad7c8fa)d0a0348)034cde3)060cfe1)892281e)e5dc72d)6fcf3b6)65abb85)12aea32)cancel_merge_when_pipeline_succeeds() (#2350) (bd82d74)PUT method when should have used a POST method. * Changed return
type to a dict as GitLab only returns {'status': 'success'} on success. Since the function
didn't work previously, this should not impact anyone. * Updated the test fixture merge_request
to add ability to create a pipeline. * Added functional test for
mr.cancel_merge_when_pipeline_succeeds()Fixes: #2349
65abb85)Authentication issues are currently hard to debug since --debug only has effect after gl.auth()
has been called.
For example, a 401 error is printed without any details about the actual HTTP request being sent:
$ gitlab --debug --server-url https://gitlab.com current-user get 401: 401 Unauthorized
By moving the call to gl.enable_debug() the usual debug logs get printed before the final error
message.
Signed-off-by: Emanuele Aina emanuele.aina@collabora.com
12aea32)Example::
gitlab project update --id 616 --mr-default-target-self 1
References:
fcd72fe)Use https://github.com/PyCQA/pylint as the website for pylint.
Validate httpx package is not installed by default
(0ecf3bb)
deps: Update all non-major dependencies
(d8a657b)
deps: Update all non-major dependencies
(b2c6d77)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v34
(623e768)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v34.20.0
(e6f1bd6)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v34.24.0
(a0553c2)
9d2b1ad)The GitLab docs refer to it as a log file: https://docs.gitlab.com/ee/api/jobs.html#get-a-log-file
"trace" is the endpoint name but not a common term people will think of for a "log file"
None is returned when not found
(c3600b4)In groups.pushrules.get(), GitLab does not return None when no rules are found. GitLab returns a
404.
Update docs to not say it will return None
Also update docs in project.pushrules.get() to be consistent. Not 100% sure if it returns None
or returns a 404, but we don't need to document that.
Closes: #2368
9bd433a)Implement secure files API
(d0a0348)
api: Add application statistics
(6fcf3b6)
api: Add support for getting a project's pull mirror details
(060cfe1)
Add the ability to get a project's pull mirror details. This was added in GitLab 15.5 and is a PREMIUM feature.
https://docs.gitlab.com/ee/api/projects.html#get-a-projects-pull-mirror-details
api: Add support for remote project import from AWS S3
(#2357,
892281e)
ci: Re-run Tests on PR Comment workflow
(034cde3)
groups: Add LDAP link manager and deprecate old API endpoints
(3a61f60)
groups: Add support for listing ldap_group_links
(#2371,
ad7c8fa)
0c98b2d)test_cancel_merge_when_pipeline_succeeds
(6525c17)This is an attempt to fix the flaky test test_cancel_merge_when_pipeline_succeeds. Were seeing a:
405 Method Not Allowed error when setting the MR to merge_when_pipeline_succeeds.
Closes: #2383
build: Officially support Python 3.11 (`74f66c7`)
project.approvals.set_approvals() method (91f08f0)97cae38)9b88132)3dde36e)a404152)enable_debug() method (b4e9ab7)bcc1eb4)b4d53f1)b7a6874)b6cc3f2)merge_requests.rst: mr_id to mr_iid (b32234d)3dde36e)Have been seeing intermittent failures in the test: tests/functional/api/test_merge_requests.py::test_merge_request_reset_approvals
Also saw a failure in: tests/functional/cli/test_cli_v4.py::test_accept_request_merge[subprocess]
Add a call to wait_for_sidekiq() to hopefully resolve the issues.
project.approvals.set_approvals() method
(91f08f0)The project.approvals.set_approvals() method used the /projects/:id/approvers end point. That
end point was removed from GitLab in the 13.11 release, on 2-Apr-2021 in commit
27dc2f2fe81249bbdc25f7bd8fe799752aac05e6 via merge commit
e482597a8cf1bae8e27abd6774b684fb90491835. It was deprecated on 19-Aug-2019.
See merge request: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57473
Use epic id instead of iid for epic notes
(97cae38)
cli: Handle list response for json/yaml output
(9b88132)
Handle the case with the CLI where a list response is returned from GitLab and json/yaml output is requested.
Add a functional CLI test to validate it works.
Closes: #2287
not-callable to pylint ignore list
(f0c02a5)The not-callable error started showing up. Ignore this error as it is invalid. Also mypy tests
for these issues.
Closes: #2334
Add basic type checks to functional/api tests
(5b642a5)
Add basic type checks to meta tests
(545d6d6)
Add basic typing to functional tests
(ee143c9)
Add basic typing to smoke tests
(64e8c31)
Add basic typing to test root
(0b2f6bc)
Add responses to pre-commit deps
(4b8ddc7)
Fix flaky test
(fdd4114)
Narrow type hints for license API
(50731c1)
Renovate and precommit cleanup
(153d373)
Revert compose upgrade
(dd04e8e)
This reverts commit f825d70e25feae8cd9da84e768ec6075edbc2200.
wait_for_sidekiq usage
(196538b)Simplify usage of wait_for_sidekiq by putting the assert if it timed out inside the function
rather than after calling it.
Use kwargs for http_request docs
(124abab)
deps: Group non-major upgrades to reduce noise
(37d14bd)
deps: Pin and clean up test dependencies
(60b9197)
deps: Pin dependencies
(953f38d)
deps: Pin GitHub Actions
(8dbaa5c)
deps: Update all non-major dependencies
(dde3642)
deps: Update all non-major dependencies
(2966234)
deps: Update black to v22.10.0
(531ee05)
deps: Update dependency commitizen to v2.35.0
(4ce9559)
deps: Update dependency mypy to v0.981
(da48849)
deps: Update dependency pylint to v2.15.3
(6627a60)
deps: Update dependency types-requests to v2.28.11.2
(d47c0f0)
deps: Update pre-commit hook maxbrunet/pre-commit-renovate to v33
(932bbde)
deps: Update typing dependencies
(81285fa)
enable_debug() method
(b4e9ab7)Add some minimal documentation about the enable_debug() method.
advanced: Add hint on type narrowing
(a404152)
api: Describe the list() and all() runners' functions
(b6cc3f2)
api: Describe use of lower-level methods
(b7a6874)
api: Update merge_requests.rst: mr_id to mr_iid
(b32234d)
Typo: Author probably meant mr_iid (i.e. project-specific MR ID)
and not mr_id (i.e. server-wide MR ID)
Closes: https://github.com/python-gitlab/python-gitlab/issues/2295
Signed-off-by: Stavros Ntentos 133706+stdedos@users.noreply.github.com
commits: Fix commit create example for binary content
(bcc1eb4)
readme: Add a basic feature list
(b4d53f1)
Migrate legacy EE tests to pytest
(88c2505)
Pre-commit trigger from tox
(6e59c12)
Pytest-docker fixtures
(3e4781a)
deps: Drop compose v1 dependency in favor of v2
(f825d70)
Make the test_project_push_rules test work.
51964b3)On Debian systems false is located at /bin/false (coreutils package). This fixes unit test failure on Debian system:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/false'
/usr/lib/python3.10/subprocess.py:1845: FileNotFoundError
Add reset_approvals api (`88693ff`)
cli: Add missing attribute for MR changes
(20c46a0)
cli: Add missing attributes for creating MRs
(1714d0a)
b87a2bc)settings.delayed_group_deletion=False as that is the recommended method to turn off the
delayed group deletion now. * Change test to look for default as pages is not mentioned in the
docs[1][1] https://docs.gitlab.com/ee/api/sidekiq_metrics.html#get-the-current-queue-metrics
deps: Update black to v22.8.0
(86b0e40)
deps: Update dependency commitizen to v2.32.2
(31aea28)
deps: Update dependency commitizen to v2.32.5
(e180f14)
deps: Update dependency pytest to v7.1.3
(ec7f26c)
deps: Update dependency types-requests to v2.28.10
(5dde7d4)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.32.2
(31ba64f)
88693ff)Added the newly added reset_approvals merge request api.
Signed-off-by: Lucas Zampieri lzampier@redhat.com
9c9eeb9)Add support for the deployment approval endpoint[1]
[1] https://docs.gitlab.com/ee/api/deployments.html#approve-or-reject-a-blocked-deployment Closes: #2253
Add support for merge_base API (`dd4fbd5`)
dd4fbd5)98f1956)Make it so can run just the test_gitlab.py functional test.
For example: $ tox -e api_func_v4 -- -k test_gitlab.py
bd4dfb4)The GitHub CI is showing a ResourceWarning, causing our test to fail.
Update test to only look for our UserWarning which should not appear.
What was seen when debugging the GitHub CI: {message: ResourceWarning( "unclosed <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 50862), raddr=('127.0.0.1', 8080)>" ), category: 'ResourceWarning', filename: '/home/runner/work/python-gitlab/python-gitlab/.tox/api_func_v4/lib/python3.10/site-packages/urllib3/poolmanager.py', lineno: 271, line: None }
ci: Make pytest annotations work
(f67514e)
deps: Update dependency commitizen to v2.31.0
(4ff0894)
deps: Update dependency commitizen to v2.32.1
(9787c5c)
deps: Update dependency types-requests to v2.28.8
(8e5b86f)
deps: Update dependency types-requests to v2.28.9
(be932f6)
deps: Update dependency types-setuptools to v64
(4c97f26)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.31.0
(71d37d9)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.32.1
(cdd6efe)
deps: Update pre-commit hook pycqa/flake8 to v5
(835d884)
dd4fbd5)client: Do not assume user attrs returned for auth() (`a07547c`)
a07547c)a07547c)This is mostly relevant for people mocking the API in tests.
Add license badge to readme
(9aecc9e)
Consolidate license and authors
(366665e)
Remove broad Exception catching from config.py
(0abc90b)
Change "except Exception:" catching to more granular exceptions.
A step in enabling the "broad-except" check in pylint.
client: Warn user on misconfigured URL in auth() (`0040b43`)
auth() (0040b43)cadb0e5)1398426)e2ea8b8)5ea48fc)Optionally keep user-provided base URL for pagination
(#2149,
e2ea8b8)
client: Ensure encoded query params are never duplicated
(1398426)
_repr_attr for Project to be path_with_namespace
(7cccefe)Previously _repr_attr was path but that only gives the basename of the path. So
https://gitlab.com/gitlab-org/gitlab would only show "gitlab". Using path_with_namespace it will
now show "gitlab-org/gitlab"
Enable mypy check disallow_any_generics
(24d17b4)
Enable mypy check no_implicit_optional
(64b208e)
Enable mypy check warn_return_any
(76ec4b4)
Update code so that the warn_return_any check passes.
433dba0)Use encoding="utf-8" in open() and open-like functions.
https://peps.python.org/pep-0597/
urlunparse instead of string replace
(6d1b62d)Use the urlunparse() function to reconstruct the URL without the query parameters.
ci: Bump semantic-release for fixed commit parser
(1e063ae)
clusters: Deprecate clusters support
(b46b379)
Cluster support was deprecated in GitLab 14.5 [1]. And disabled by default in GitLab 15.0 [2]
[1] https://docs.gitlab.com/ee/api/project_clusters.html [2] https://gitlab.com/groups/gitlab-org/configure/-/epics/8
deps: Update dependency commitizen to v2.29.2
(30274ea)
deps: Update dependency flake8 to v5
(cdc384b)
deps: Update dependency types-requests to v2.28.6
(54dd4c3)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.29.2
(4988c02)
topics: 'title' is required when creating a topic
(271f688)
In GitLab >= 15.0 title is required when creating a topic.
5ea48fc)Support downloading archive subpaths
(cadb0e5)
client: Warn user on misconfigured URL in auth()
(0040b43)
client: Factor out URL check into a helper
(af21a18)
client: Remove handling for incorrect link header
(77c04b1)
This was a quirk only present in GitLab 13.0 and fixed with 13.1. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33714 and https://gitlab.com/gitlab-org/gitlab/-/issues/218504 for more context.
67508e8)The functional tests have been erratic. Current theory is that we are starting the tests before the GitLab container is fully up and running.
[1] https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html
69014e9)Use the GitLab docker image 15.2.0-ee.0 in the functional testing.
6f71c66)Allow sort/ordering for project releases (`b1dd284`)
b1dd284)005ba93)194ee01)66461ba)8703324)4882cb2)7afd340)4794ecc)0e1c0dd)asdict() and to_json() methods to Gitlab Objects (08ac071)284d739)70148c6)fc33c93)3b1ede4)3f67c4b)b213dd3)b5cdc09)get for a MR approval rule (89c18c6)d9126cd)params (1af44ce)c6dd57c)1ef7018)ac46c1c)get_all param (and --get-all) to allow passing all to API (7c71d5d)attributes property to show updates (e5affc8)5fc3216)0daec5f)5d9c198)4a6f8d6)03f5484)9c5b8d5)e2afb84)d5de4b1)065a1a5)53cbecc)91c17b7)-v that breaks the command (c523e18)Add the notes attribute to GroupEpic
5d9c198)Ensure the path elements that are passed to the server are escaped. For example a "/" will be changed to "%2F"
Closes: #2116
attributes property to show updates
(e5affc8)Previously the attributes method would show the original values in a Gitlab Object even if they
had been updated. Correct this so that the updated value will be returned.
Also use copy.deepcopy() to ensure that modifying the dictionary returned can not also modify the object.
Support array types for most resources
(d9126cd)
Use the [] after key names for array variables in params
(1af44ce)
params).This is step 3 in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes
Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b Step two was: commit a57334f1930752c70ea15847a39324fa94042460
Fixes: #1698
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
cli: Remove irrelevant MR approval rule list filters
(0daec5f)
config: Raise error when gitlab id provided but no config file found
(ac46c1c)
config: Raise error when gitlab id provided but no config section found
(1ef7018)
runners: Fix listing for /runners/all
(c6dd57c)
lazy boolean attribute to RESTObject
(a7e8cfb)This can be used to tell if a RESTObject was created using lazy=True.
Add a message to the AttributeError if attribute access fails for an instance created with
lazy=True.
api_func_v4
(8cf5cd9)The CLI test is cli_func_v4 and using api_func_v4 matches with that naming convention.
strict_equality
(a29cd6c)Enable the mypy strict_equality check.
17c01ea)Enable using GitLab Enterprise Edition (EE) in the functional tests. This will allow us to add functional tests for EE only features in the functional tests.
In our fixtures that create: - groups - project merge requests - projects - users
They delete the created objects after use. Now wait to ensure the objects are deleted before continuing as having unexpected objects existing can impact some of our tests.
d87d6b1)Saw issues in the CI where reset_gitlab() would fail. It would fail to delete the group that is created when GitLab starts up. Extending the timeout didn't fix the issue.
Changed the code to use the new helpers.safe_delete() function. Which will delete the resource and
then make sure it is deleted before returning.
Also added some logging functionality that can be seen if logging is turned on in pytest.
4b798fc)This reverts commit 67ab24fe5ae10a9f8cc9122b1a08848e8927635d.
e734470)Instead of have a multi-nested series of try blocks. Convert it to a more readable series of if
statements.
authors: Fix email and do the ABC
(9833632)
ci_lint: Add create attributes
(6e1342f)
deps: Update black to v22.6.0
(82bd596)
deps: Update dependency commitizen to v2.28.0
(8703dd3)
deps: Update dependency commitizen to v2.29.0
(c365be1)
deps: Update dependency mypy to v0.971
(7481d27)
deps: Update dependency pylint to v2.14.4
(2cee2d4)
deps: Update dependency pylint to v2.14.5
(e153636)
deps: Update dependency requests to v2.28.1
(be33245)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.28.0
(d238e1b)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.29.0
(ad8d62a)
deps: Update pre-commit hook pycqa/pylint to v2.14.4
(5cd39be)
deps: Update pre-commit hook pycqa/pylint to v2.14.5
(c75a1d8)
deps: Update typing dependencies
(f2209a0)
deps: Update typing dependencies
(e772248)
docs: Convert tabs to spaces
(9ea5520)
Some tabs snuck into the documentation. Convert them to 4-spaces.
Describe fetching existing export status
(9c5b8d5)
Describe ROPC flow in place of password authentication
(91c17b7)
Document CI Lint usage
(d5de4b1)
Update return type of pushrules
(53cbecc)
Update the return type of pushrules to surround None with back-ticks to make it code-formatted.
authors: Add John
(e2afb84)
cli: Showcase use of token scopes
(4a6f8d6)
projects: Document export with upload to URL
(03f5484)
readme: Remove redundant -v that breaks the command
(c523e18)
users: Add docs about listing a user's projects
(065a1a5)
Add docs about listing a user's projects.
Update docs on the membership API to update the URL to the upstream docs and also add a note that it requires Administrator access to use.
fc33c93)Boolean. Enable or disable merge pipelines.
See: https://docs.gitlab.com/ee/api/projects.html#edit-project https://docs.gitlab.com/ee/ci/pipelines/merged_results_pipelines.html
asdict() and to_json() methods to Gitlab Objects
(08ac071)Add an asdict() method that returns a dictionary representation copy of the Gitlab Object. This is
a copy and changes made to it will have no impact on the Gitlab Object.
The asdict() method name was chosen as both the dataclasses and attrs libraries have an
asdict() function which has the similar purpose of creating a dictionary represenation of an
object.
Also add a to_json() method that returns a JSON string representation of the object.
Closes: #1116
0e1c0dd)See: 'scope' here:
https://docs.gitlab.com/ee/api/jobs.html#list-project-jobs
Add support for group and project invitations API
(7afd340)
Add support for group push rules
(b5cdc09)
Add the GroupPushRules and GroupPushRulesManager classes.
Closes: #1259
See: https://docs.gitlab.com/ee/api/releases/#list-releases
Support validating CI lint results
(3b1ede4)
api: Add support for get for a MR approval rule
(89c18c6)
In GitLab 14.10 they added support to get a single merge request approval rule [1]
Add support for it to ProjectMergeRequestApprovalRuleManager
[1] https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-a-single-merge-request-level-rule
api: Add support for instance-level registry repositories
(284d739)
cli: Add a custom help formatter
(005ba93)
Add a custom argparse help formatter that overrides the output format to list items vertically.
The formatter is derived from argparse.HelpFormatter with minimal changes.
Co-authored-by: John Villalovos john@sodarock.com
Co-authored-by: Nejc Habjan nejc.habjan@siemens.com
cli: Add support for global CI lint
(3f67c4b)
groups: Add support for group-level registry repositories
(70148c6)
groups: Add support for shared projects API
(66461ba)
issues: Add support for issue reorder API
(8703324)
namespaces: Add support for namespace existence API
(4882cb2)
objects: Add Project CI Lint support
(b213dd3)
Add support for validating a project's CI configuration [1]
[1] https://docs.gitlab.com/ee/api/lint.html
4794ecc)Migrate services to integrations
(a428051)
objects: Move ci lint to separate file
(6491f1b)
test-projects: Apply suggestions and use fixtures
(a51f848)
test-projects: Remove test_restore_project
(9be0875)
https://github.com/python-gitlab/python-gitlab/issues/1698 has been fixed. Add test to show that.
podman users to run functional tests
(ff215b7)Users of podman will likely have DOCKER_HOST set to something like
unix:///run/user/1000/podman/podman.sock
Pass this environment variable so that it will be used during the functional tests.
Use monkeypatch to ensure that no config files are reported for the test.
Closes: #2172
gl.lint()
(95fe924)Catch the deprecation warning for the call to gl.lint(), so it won't show up in the log.
cli: Add tests for token scopes
(263fe3d)
ee: Add an EE specific test
(10987b3)
functional: Replace len() calls with list membership checks
(97e0eb9)
functional: Simplify token creation
(67ab24f)
functional: Use both get_all and all in list() tests
(201298d)
projects: Add unit tests for projects
(67942f0)
client: Introduce iterator=True and deprecate as_list=False in list() (`cdc6605`)
b644721)ce9216c)90635a7)f57139d)c3c6086)1dc9d0f)0d44b11)384031c)3fa330c)iterator=True and deprecate as_list=False in list() (cdc6605)1efb123)15a242c)5d14867)22ae101)f555bfb)8f8611a)522ecff)194b6be)49c7e83)5583eaa)2194a44)048d66a)ae7d3b0)4d431e5)24b720e)as_list=False or all=True in Getting started (de8c6e8)base: Do not fail repr() on lazy objects
(1efb123)
cli: Fix project export download for CLI
(5d14867)
Since ac1c619cae6481833f5df91862624bf0380fef67 we delete parent arg keys from the args dict so this has been trying to access the wrong attribute.
15a242c)Using the CLI the command: gitlab project-merge-request-approval-rule list --mr-iid 1 --project-id foo/bar
Would raise an exception. This was due to the fact that _id_attr and _repr_attr were set for
keys which are not returned in the response.
Add a unit test which shows the repr function now works. Before it did not.
This is an EE feature so we can't functional test it.
Closes: #2065
d08d07d)Add a link to the Commitizen website in the Github workflow. Hopefully this will help people when their job fails.
Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had used the name argument for
ModuleNotFoundError(). This basically is the equivalent of not passing any message to
ModuleNotFoundError(). So when the exception was raised it wasn't very helpful.
Correct that and add a unit-test that shows we get the message we expect.
0afcc3e)Enable the 'consider-using-sys-exit' pylint check and fix errors raised.
1a2781e)Enable the pylint check "raise-missing-from" and fix errors detected.
d6870a9)Enable the pylint check: "attribute-defined-outside-init" and fix errors detected.
d0b0811)Enable the pylint check "no-else-return" and fix the errors detected.
80aadaf)Enable the pylint check "no-self-use" and fix the errors detected.
1324ce1)Enable the pylint check "redefined-outer-name" and fix the errors detected.
1e89164)Enable the pylint checks: * unnecessary-pass * unspecified-encoding
Update code to resolve errors found
50fdbc4)Enabled the pylint checks that don't require any code changes. Previously these checks were disabled.
eeab035)A new error was reported when running pylint==2.14.3: gitlab/client.py:488:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Fixed this issue.
EncodedId creation always return EncodedId
(a1a246f)There is no reason to return an int as we can always return a str version of the int
Change EncodedId to always return an EncodedId. This removes the need to have mypy ignore the
error raised.
RequiredOptional to the gitlab.types module
(7d26530)By having RequiredOptional in the gitlab.base module it makes it difficult with circular
imports. Move it to the gitlab.types module which has no dependencies on any other gitlab
module.
utils._validate_attrs inside types.RequiredOptional
(9d629bb)Move the validate_attrs function to be inside the RequiredOptional class. It makes sense for it
to be part of the class as it is working on data related to the class.
Patch sphinx for explicit re-exports
(06871ee)
Remove use of '%' string formatter in gitlab/utils.py
(0c5a121)
Replace usage with f-string
__call__() to run() in GitlabCLI
(6189437)Less confusing to have it be a normal method.
whaction and action to resource_action in CLI
(fb3f28a)Rename the variables whaction and action to resource_action to improve code-readability.
what to gitlab_resource
(c86e471)Naming a variable what makes it difficult to understand what it is used for.
Rename it to gitlab_resource as that is what is being stored.
The Gitlab documentation talks about them being resources: https://docs.gitlab.com/ee/api/api_resources.html
This will improve code readability.
96e994d)We previously converted all string formatting to use f-strings. Enable pylint check to enforce this.
aa972d4)Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where get() in a
GetWithoutIdMixin based class could return None
Update the type-hints to no longer return Optional AKA None
7f2240f)Use multiple processors when running PyLint. On my system it took about 10.3 seconds to run PyLint before this change. After this change it takes about 5.8 seconds to run PyLint.
bda020b)Have been seeing timeout issues more and more. Increase timeout from 200 seconds to 300 seconds (5 minutes).
ci: Pin 3.11 to beta.1
(7119f2d)
cli: Ignore coverage on exceptions triggering cli.die
(98ccc3c)
cli: Rename "object" to "GitLab resource"
(62e64a6)
Make the parser name more user friendly by renaming from generic "object" to "GitLab resource"
deps: Ignore python-semantic-release updates
(f185b17)
deps: Update actions/setup-python action to v4
(77c1f03)
deps: Update dependency commitizen to v2.27.1
(456f9f1)
deps: Update dependency mypy to v0.960
(8c016c7)
deps: Update dependency mypy to v0.961
(f117b2f)
deps: Update dependency pylint to v2.14.3
(9a16bb1)
deps: Update dependency requests to v2.28.0
(d361f4b)
deps: Update pre-commit hook commitizen-tools/commitizen to v2.27.1
(22c5db4)
deps: Update pre-commit hook pycqa/pylint to v2.14.3
(d1fe838)
deps: Update typing dependencies
(acc5c39)
deps: Update typing dependencies
(aebf9c8)
deps: Update typing dependencies
(f3f79c1)
docs: Ignore nitpicky warnings
(1c3efb5)
gitlab: Fix implicit re-exports for mpypy
(981b844)
mixins: Remove None check as http_get always returns value
(f0152dc)
workflows: Explicitly use python-version
(eb14475)
Documentation updates to reflect addition of mutually exclusive attributes
(24b720e)
Drop deprecated setuptools build_sphinx
(048d66a)
Use as_list=False or all=True in Getting started
(de8c6e8)
In the "Getting started with the API" section of the documentation, use either as_list=False or
all=True in the example usages of the list() method.
Also add a warning about the fact that list() by default does not return all items.
api: Add separate section for advanced usage
(22ae101)
api: Document usage of head() methods
(f555bfb)
api: Fix incorrect docs for merge_request_approvals
(#2094,
5583eaa)
The set_approvers() method is on the ProjectApprovalManager class. It is not part of the
ProjectApproval class.
The docs were previously showing to call set_approvers using a ProjectApproval instance, which
would fail. Correct the documentation.
This was pointed out by a question on the Gitter channel.
Co-authored-by: Nejc Habjan nejc.habjan@siemens.com
api: Stop linking to python-requests.org
(49c7e83)
api-usage: Add import os in example
(2194a44)
ext: Fix rendering for RequiredOptional dataclass
(4d431e5)
projects: Document 404 gotcha with unactivated integrations
(522ecff)
projects: Provide more detailed import examples
(8f8611a)
usage: Refer to upsteam docs instead of custom attributes
(ae7d3b0)
variables: Instruct users to follow GitLab rules for values
(194b6be)
Add support for Protected Environments
(1dc9d0f)
https://docs.gitlab.com/ee/api/protected_environments.html - https://github.com/python-gitlab/python-gitlab/issues/1130
no write operation are implemented yet as I have no use case right now and am not sure how it should be done
3fa330c)add exclusive tuple to RequiredOptional data class to support for mutually exclusive attributes
consolidate _check_missing_create_attrs and _check_missing_update_attrs from mixins.py into _validate_attrs in utils.py
change _create_attrs in board list manager classes from required=('label_ld',) to exclusive=('label_id','asignee_id','milestone_id')
closes https://github.com/python-gitlab/python-gitlab/issues/1897
c3c6086)This allows accessing the elements by value, i.e.:
import gitlab.const gitlab.const.AccessLevel(20)
api: Implement HEAD method
(90635a7)
api: Support head() method for get and list endpoints
(ce9216c)
client: Introduce iterator=True and deprecate as_list=False in list()
(cdc6605)
as_list=False is confusing as it doesn't explain what is being returned. Replace it with
iterator=True which more clearly explains to the user that an iterator/generator will be
returned.
This maintains backward compatibility with as_list but does issue a DeprecationWarning if
as_list is set.
docker: Provide a Debian-based slim image
(384031c)
downloads: Allow streaming downloads access to response iterator
(#1956,
b644721)
Allow access to the underlying response iterator when downloading in streaming mode by specifying
iterator=True.
Update type annotations to support this change.
Document the usage of the iterator=True option when downloading artifacts
f57139d)As requested in #1604.
Co-authored-by: John Villalovos john@sodarock.com
0d44b11)Commit b6447211754e126f64e12fc735ad74fe557b7fb4 inadvertently introduced a possible breaking change
as it added a new argument iterator and added it in between existing (potentially positional)
arguments.
This moves the iterator argument to the end of the argument list and requires it to be a
keyword-only argument.
Do not recommend plain gitlab.const constants
(d652133)
Remove no-op id argument in GetWithoutIdMixin
(0f2a602)
mixins: Extract custom type transforms into utils
(09b3b22)
Add more tests for RequiredOptional
(ce40fde)
Add tests and clean up usage for new enums
(323ab3c)
Increase client coverage
(00aec96)
Move back to using latest Python 3.11 version
(8c34781)
api: Add tests for HEAD method
(b0f02fa)
cli: Improve coverage for custom actions
(7327f78)
gitlab: Increase unit test coverage
(df072e1)
pylint: Enable pylint "unused-argument" check
(23feae9)
Enable the pylint "unused-argument" check and resolve issues it found.
**kwargs but not then passing them on through to the next
level. Now pass **kwargs to next level. * Other functions had no reason to accept **kwargs, so
remove it * And a few other fixes.objects: Support get project storage endpoint (`8867ee5`)
8867ee5)repr() if present (6b47c26)e598762)allow_abbrev value to fix arguments collision problem (#2013) (d68cacf)f553fd3)f553fd3)Python 3.11 added an additional check in the argparse libary which detected duplicate subparsers being added. We had duplicate subparsers being added.
Make sure we don't add duplicate subparsers.
Closes: #2015
fix(cli): change default allow_abbrev value to fix argument collision
cz to default tox environment list and skip_missing_interpreters
(ba8c052)Add the cz (comittizen) check by default.
Set skip_missing_interpreters = True so that when a user runs tox and doesn't have a specific version of Python it doesn't mark it as an error.
build/ directory from mypy check
(989a12b)The build/ directory is created by the tox environment twine-check. When the build/ directory
exists mypy will have an error.
flake8 to be flake8
(78b4f99)Previously the test was called pep8. The test only runs flake8 so call it flake8 to be more
precise.
pylint check by default in tox
(55ace1d)Since we require pylint to pass in the CI. Let's run it by default in tox.
ci: Fix prefix for action version
(1c02189)
ci: Pin semantic-release version
(0ea61cc)
ci: Replace commitlint with commitizen
(b8d15fe)
deps: Update dependency pylint to v2.13.8
(b235bb0)
deps: Update dependency pylint to v2.13.9
(4224950)
deps: Update dependency types-requests to v2.27.23
(a6fed8b)
deps: Update dependency types-requests to v2.27.24
(f88e3a6)
deps: Update dependency types-requests to v2.27.25
(d6ea47a)
deps: Update pre-commit hook pycqa/pylint to v2.13.8
(1835593)
deps: Update pre-commit hook pycqa/pylint to v2.13.9
(1e22790)
renovate: Set schedule to reduce noise
(882fe7a)
3e0d4d9)As shown here, Admin access is set to 60: https://docs.gitlab.com/ee/api/protected_branches.html#protected-branches-api
Update issue example and extend API usage docs
(aad71d2)
CONTRIBUTING.rst: Fix link to conventional-changelog commit format documentation
(2373a4f)
merge_requests: Add new possible merge request state and link to the upstream docs
(e660fa8)
The actual documentation do not mention the locked state for a merge request
Display human-readable attribute in repr() if present
(6b47c26)
objects: Support get project storage endpoint
(8867ee5)
ux: Display project.name_with_namespace on project repr
(e598762)
This change the repr from:
$ gitlab.projects.get(id=some_id) <Project id:some_id>
To:
$ gitlab.projects.get(id=some_id) <Project id:some_id name_with_namespace:"group_name / project_name">
This is especially useful when working on random projects or listing of projects since users generally don't remember projects ids.
fa47829)Emit a warning when using a list() method returns max (`1339d64`)
list() method returns max (1339d64)fcd37fe)6f93c05)d1d96bd)7beb20f)3431887)149d244)c3ef1b5)3b49e4d)e1ad93d)Add 52x range to retry transient failures and tests
(c3ef1b5)
Add ChunkedEncodingError to list of retryable exceptions
(7beb20f)
Also retry HTTP-based transient errors
(3b49e4d)
Avoid passing redundant arguments to API
(3431887)
cli: Add missing filters for project commit list
(149d244)
client: Remove duplicate code
(5cbbf26)
deps: Update black to v22.3.0
(8d48224)
deps: Update codecov/codecov-action action to v3
(292e91b)
deps: Update dependency mypy to v0.950
(241e626)
deps: Update dependency pylint to v2.13.3
(0ae3d20)
deps: Update dependency pylint to v2.13.4
(a9a9392)
deps: Update dependency pylint to v2.13.5
(5709675)
deps: Update dependency pylint to v2.13.7
(5fb2234)
deps: Update dependency pytest to v7.1.2
(fd3fa23)
deps: Update dependency types-requests to v2.27.16
(ad799fc)
deps: Update dependency types-requests to v2.27.21
(0fb0955)
deps: Update dependency types-requests to v2.27.22
(22263e2)
deps: Update dependency types-setuptools to v57.4.12
(6551353)
deps: Update pre-commit hook pycqa/pylint to v2.13.3
(8f0a3af)
deps: Update pre-commit hook pycqa/pylint to v2.13.4
(9d0b252)
deps: Update pre-commit hook pycqa/pylint to v2.13.5
(17d5c6c)
deps: Update pre-commit hook pycqa/pylint to v2.13.7
(1396221)
deps: Update typing dependencies
(c12466a)
deps: Update typing dependencies
(d27cc6a)
deps: Upgrade gitlab-ce to 14.9.2-ce.0
(d508b18)
e1ad93d)list() method returns max
(1339d64)A common cause of issues filed and questions raised is that a user will call a list() method and
only get 20 items. As this is the default maximum of items that will be returned from a list()
method.
To help with this we now emit a warning when the result from a list() method is greater-than or
equal to 20 (or the specified per_page value) and the user is not using either all=True,
all=False, as_list=False, or page=X.
d1d96bd)This reverts commit e3035a799a484f8d6c460f57e57d4b59217cd6de.
object: Add pipeline test report summary support (`a97e0cf`)
4060146)Some endpoints are not returning the Retry-After header when rate-limiting occurrs. In those cases
use the RateLimit-Reset [1] header, if available.
Closes: #1889
[1] https://docs.gitlab.com/ee/user/admin_area/settings/user_and_ip_rate_limits.html#response-headers
deps: Update actions/checkout action to v3
(7333cbb)
deps: Update actions/setup-python action to v3
(7f845f7)
deps: Update actions/stale action to v5
(d841185)
deps: Update actions/upload-artifact action to v3
(18a0eae)
deps: Update black to v22
(3f84f1b)
deps: Update dependency mypy to v0.931
(33646c1)
deps: Update dependency mypy to v0.940
(dd11084)
deps: Update dependency mypy to v0.941
(3a9d4f1)
deps: Update dependency mypy to v0.942
(8ba0f8c)
deps: Update dependency pylint to v2.13.0
(5fa403b)
deps: Update dependency pylint to v2.13.1
(eefd724)
deps: Update dependency pylint to v2.13.2
(10f15a6)
deps: Update dependency pytest to v7
(ae8d70d)
deps: Update dependency pytest to v7.1.0
(27c7e33)
deps: Update dependency pytest to v7.1.1
(e31f2ef)
deps: Update dependency pytest-console-scripts to v1.3
(9c202dd)
deps: Update dependency pytest-console-scripts to v1.3.1
(da392e3)
deps: Update dependency requests to v2.27.1
(95dad55)
deps: Update dependency sphinx to v4.4.0
(425d161)
deps: Update dependency sphinx to v4.5.0
(36ab769)
deps: Update dependency types-requests to v2.27.12
(8cd668e)
deps: Update dependency types-requests to v2.27.14
(be6b54c)
deps: Update dependency types-requests to v2.27.15
(2e8ecf5)
deps: Update dependency types-setuptools to v57.4.10
(b37fc41)
deps: Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v8
(5440780)
deps: Update pre-commit hook pycqa/pylint to v2.13.0
(9fe60f7)
deps: Update pre-commit hook pycqa/pylint to v2.13.1
(1d0c6d4)
deps: Update pre-commit hook pycqa/pylint to v2.13.2
(14d367d)
deps: Update typing dependencies
(21e7c37)
deps: Update typing dependencies
(37a7c40)
93d4403)Add pipeline test report summary support
(d78afb3)
Fix typo and incorrect style
(2828b10)
chore: Include docs .js files in sdist
(3010b40)
a97e0cf)artifacts: Deprecate artifacts() and artifact() methods (`64d01ef`)
85a734f)c01c034)0717517)c8c2fa7)e30f39d)delete method for labels (0841a2a)bd1ecdd)5e711fd)bb1f054)b7a1266)64d01ef)7a13b9b)delete method for labels
(0841a2a)The usage of deleting was incorrect according to the current API. Remove custom delete() method as
not needed.
Add tests to show it works with labels needing to be encoded.
Also enable the test_group_labels() test function. Previously it was disabled.
Add ability to do a get() for group labels.
Closes: #1867
e30f39d)e825653)There are occasions where a GitLab list() call does not return the x-per-page header. For
example the listing of custom attributes.
Update the type-hints to reflect that.
warnings.warn wrapper
(6ca9aa2)Create a custom warnings.warn wrapper that will walk the stack trace to find the first frame
outside of the gitlab/ path to print the warning against. This will make it easier for users to
find where in their code the error is generated from
a57334f)Create a new ArrayAttribute class. This is to indicate types which are sent to the GitLab server as arrays https://docs.gitlab.com/ee/api/#array
At this stage it is identical to the CommaSeparatedListAttribute class but will be used later to support the array types sent to GitLab.
This is the second step in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes
Step one was: commit 5127b1594c00c7364e9af15e42d2e2f2d909449b
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
Related: #1698
utils.copy_dict()
(7cf35b2)The non-keyword arguments were a tiny bit confusing as the destination was first and the source was second.
Change the order and require key-word only arguments to ensure we don't silently break anyone.
2b6edb9)700d25d)Co-authored-by: Nejc Habjan hab.nejc@gmail.com
Add transient errors retry info
(b7a1266)
Enable gitter chat directly in docs
(bd1ecdd)
Revert "chore: add temporary banner for v3"
(#1864,
7a13b9b)
This reverts commit a349793307e3a975bb51f864b48e5e9825f70182.
Co-authored-by: Wadim Klincov wadim.klincov@siemens.com
64d01ef)artifacts: Add support for project artifacts delete API
(c01c034)
merge_request_approvals: Add support for deleting MR approval rules
(85a734f)
mixins: Allow deleting resources without IDs
(0717517)
objects: Add a complete artifacts manager
(c8c2fa7)
5b7d00d)When pagination occurs python-gitlab uses the URL provided by the GitLab server to use for the next request.
We had previously set the GitLab server configuraiton to say its URL was http://gitlab.test which
is not in DNS. Set the hostname in the URL to http://127.0.0.1:8080 which is the correct URL for
the GitLab server to be accessed while doing functional tests.
Closes: #1877
cli: Make 'per_page' and 'page' type explicit (`d493a5e`)
cli: Allow custom methods in managers
(8dfed0c)
cli: Make 'per_page' and 'page' type explicit
(d493a5e)
cli: Make 'timeout' type explicit
(bbb7df5)
objects: Make resource access tokens and repos available in CLI
(e0a3a41)
Always use context manager for file IO
(e8031f4)
Consistently use open() encoding and file descriptor
(dc32d54)
Create return type-hints for get_id() & encoded_id
(0c3a1d1)
Create return type-hints for RESTObject.get_id() and RESTObject.encoded_id. Previously was
saying they return Any. Be more precise in saying they can return either: None, str, or int.
Don't explicitly pass args to super()
(618267c)
Remove old-style classes
(ae2a015)
Remove redundant list comprehension
(271cfd3)
Rename gitlab/__version__.py -> gitlab/_version.py
(b981ce7)
It is confusing to have a gitlab/__version__.py because we also create a variable
gitlab.__version__ which can conflict with gitlab/__version__.py.
For example in gitlab/const.py we have to know that gitlab.__version__ is a module and not the
variable due to the ordering of imports. But in most other usage gitlab.__version__ is a version
string.
To reduce confusion make the name of the version file gitlab/_version.py.
types.ListAttribute to types.CommaSeparatedListAttribute
(5127b15)This name more accurately describes what the type is. Also this is the first step in a series of steps of our goal to add full support for the GitLab API data types[1]: * array * hash * array of hashes
[1] https://docs.gitlab.com/ee/api/#encoding-api-parameters-of-array-and-hash-types
When doing the functional tests use the new function projects.transfer instead of the deprecated
function projects.transfer_project()
Enhance release docs for CI_JOB_TOKEN usage
(5d973de)
changelog: Add missing changelog items
(01755fb)
9c8c804)Add a test to make sure that all of the gitlab/v4/objects/ files are imported in
gitlab/v4/objects/__init__.py
match_querystring to match
(d16e41b)In the responses library the usage of match_querystring is deprecated. Convert to using match
5254f19)Convert all usage of the httpmock library to using the responses library.
208da04)Convert from httmock to responses in test_mixins_methods.py
This leaves only one file left to convert
api: Add project.transfer() and deprecate transfer_project() (`259668a`)
c01b7c4)transfer() (0007006)project.transfer() and deprecate transfer_project() (259668a)SaveMixin.save() (e6258a4)6f64d40)12435d7)755e0a3)lazy parameter (888f332)1863f30)8e589c4)3d49e5e)1863f30)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' --------------------------^
http_list for some ProjectCommit methods
(497e860)Fix the type-hints and use http_list() for the ProjectCommits methods: - diff() - merge_requests()
This will enable using the pagination support we have for lists.
Closes: #1805
Closes: #1231
3d49e5e)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
8e589c4)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
12435d7)Make sure all usage of the ID in the URL path is encoded. Normally it isn't an issue as most IDs are integers or strings which don't contain a slash ('/'). But when the ID is a string with a slash character it will break things.
Add a test case that shows this fixes wikis issue with subpages which use the slash character.
Closes: #1079
lazy parameter
(888f332)Commit 8da0b758c589f608a6ae4eeb74b3f306609ba36d added the lazy parameter to the services get()
method but missed then using the lazy parameter when it called super(...).get(...)
Closes: #1828
cli: Add missing list filters for environments
(6f64d40)
cli: Url-encode path components of the URL
(ac1c619)
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
755e0a3)Change it so that:
GroupMemberAllManager uses GroupMemberAll object ProjectMemberAllManager uses ProjectMemberAll object
Create GroupMemberAll and ProjectMemberAll objects that do not support any Mixin type methods.
Previously we were using GroupMember and ProjectMember which support the save() and delete()
methods but those methods will not work with objects retrieved using the /members/all/ API
calls.
list() API calls: [1] GET /groups/:id/members/all GET /projects/:id/members/all
get() API calls: [2] GET /groups/:id/members/all/:user_id GET /projects/:id/members/all/:user_id
Closes: #1825
Closes: #848
[1] https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project-including-inherited-and-invited-members [2] https://docs.gitlab.com/ee/api/members.html#get-a-member-of-a-group-or-project-including-inherited-and-invited-members
pprint() and pformat() methods to RESTObject
(d69ba04)This is useful in debugging and testing. As can easily print out the values from an instance in a more human-readable form.
2c036a9)Use the stale action to close issues and pull-requests with no activity.
Issues: It will mark them as stale after 60 days and then close
them once they have been stale for 15 days.
Pull-Requests: It will mark pull-requests as stale after 90 days and then close
https://github.com/actions/stale
Closes: #1649
a2e7c38)Add EncodedId string class. This class returns a URL-encoded string but ensures it will only URL-encode it once even if recursively called.
Also added some functional tests of 'lazy' objects to make sure they work.
a92b55b)Add a functional test of test mergerequest.get() and mergerequest.get(..., lazy=True)
Closes: #1425
tests/functional/conftest.py
(a1ac9ae)I have found trying to debug issues in the functional tests can be difficult. Especially when trying to figure out failures in the CI running on Github.
Add logging to tests/functional/conftest.py to have a better understanding of what is happening
during a test run which is useful when trying to troubleshoot issues in the CI.
Previously c8256a5933d745f70c7eea0a7d6230b51bac0fbc was done to fix this but it missed two other failures.
7c59fac)There was a missing comma which meant the strings were concatenated instead of being two separate strings.
Ignore intermediate coverage artifacts
(110ae91)
Replace usage of utils._url_encode() with utils.EncodedId()
(b07eece)
utils.EncodedId() has basically the same functionalityy of using utils._url_encode(). So remove utils._url_encode() as we don't need it.
d9457d8)build_sphinx to fail due to setup.cfg warning-is-error
docs: Use admonitions consistently
(55c67d1)
groups: Use encoded_id for group path
(868f243)
objects: Use self.encoded_id where applicable
(75758bf)
Updated a few remaining usages of self.id to use self.encoded_id as for the most part we
shouldn't be using self.id
There are now only a few (4 lines of code) remaining uses of self.id, most of which seem that they
should stay that way.
self.encoded_id where could be a string
(c3c3a91)Updated a few remaining usages of self.id to use self.encoded_id where it could be a string
value.
0788fe6)Co-authored-by: John Villalovos john@sodarock.com
d5b3744)If a CI job can't upload coverage results to codecov.com it causes the CI to fail and code can't be merged.
Update project access token API reference link
(73ae955)
cli: Make examples more easily navigable by generating TOC
(f33c523)
c01b7c4)See https://docs.gitlab.com/ee/api/group_access_tokens.html
Add support for Groups API method transfer()
(0007006)
api: Add project.transfer() and deprecate transfer_project()
(259668a)
api: Return result from SaveMixin.save()
(e6258a4)
Return the new object data when calling SaveMixin.save().
Also remove check for None value when calling self.manager.update() as that method only returns
a dictionary.
Closes: #1081
57bb67a)Your coding agent can read these notes before it upgrades. Set up the MCP server →