From 1a2a68c3f4e9c97c637d1eab15478c7f26992a9d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 02:43:35 +0000 Subject: [PATCH 001/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 4 ++-- requirements-docker.txt | 2 +- requirements-lint.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4cc11b7cd..8b1b6a779 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.5.0 + rev: v4.6.0 hooks: - id: commitizen stages: [commit-msg] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 39.227.2 + rev: 39.240.1 hooks: - id: renovate-config-validator diff --git a/requirements-docker.txt b/requirements-docker.txt index 30c190b42..98b70440c 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -1,3 +1,3 @@ -r requirements.txt -r requirements-test.txt -pytest-docker==3.2.0 +pytest-docker==3.2.1 diff --git a/requirements-lint.txt b/requirements-lint.txt index 3af7a1554..a997f6834 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,7 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.5.0 +commitizen==4.6.0 flake8==7.2.0 isort==6.0.1 mypy==1.15.0 From 8dbdd7e75447d01a457ac55f18066ebd355e4dbf Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Mon, 14 Apr 2025 07:59:21 +0000 Subject: [PATCH 002/102] docs(api-usage-graphql): fix the example graphql query string --- docs/api-usage-graphql.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api-usage-graphql.rst b/docs/api-usage-graphql.rst index 539b7ca3d..d20aeeef1 100644 --- a/docs/api-usage-graphql.rst +++ b/docs/api-usage-graphql.rst @@ -49,12 +49,12 @@ Get the result of a query: .. code-block:: python - query = """{ - query { - currentUser { + query = """ + { + currentUser { name - } } + } """ result = gq.execute(query) @@ -63,12 +63,12 @@ Get the result of a query using the async client: .. code-block:: python - query = """{ - query { - currentUser { + query = """ + { + currentUser { name - } } + } """ result = await async_gq.execute(query) From 5edd2e66cd5d4cd48fcf5f996d4ad4c3d495b3fa Mon Sep 17 00:00:00 2001 From: rickbrouwer Date: Sun, 13 Apr 2025 10:01:42 +0200 Subject: [PATCH 003/102] feat(api): add support for avatar removal When attempting to remove for example a group or project avatar by setting it to an empty string, the current implementation raises a validation error about unsupported file formats. --- docs/gl_objects/groups.rst | 5 +++ docs/gl_objects/projects.rst | 5 +++ docs/gl_objects/topics.rst | 13 ++++++++ gitlab/utils.py | 6 ++++ tests/functional/api/test_groups.py | 28 +++++++++++++++++ tests/functional/api/test_projects.py | 23 ++++++++++++++ tests/functional/api/test_topics.py | 45 +++++++++++++++++++++++++++ 7 files changed, 125 insertions(+) diff --git a/docs/gl_objects/groups.rst b/docs/gl_objects/groups.rst index 2acc57d9e..0d49eb0bb 100644 --- a/docs/gl_objects/groups.rst +++ b/docs/gl_objects/groups.rst @@ -82,6 +82,11 @@ Set the avatar image for a group:: group.avatar = open('path/to/file.png', 'rb') group.save() +Remove the avatar image for a group:: + + group.avatar = "" + group.save() + Remove a group:: gl.groups.delete(group_id) diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index 335bf0603..6bd09c26c 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -109,6 +109,11 @@ Set the avatar image for a project:: project.avatar = open('path/to/file.png', 'rb') project.save() +Remove the avatar image for a project:: + + project.avatar = "" + project.save() + Delete a project:: gl.projects.delete(project_id) diff --git a/docs/gl_objects/topics.rst b/docs/gl_objects/topics.rst index d34c0ecac..7b1a7991a 100644 --- a/docs/gl_objects/topics.rst +++ b/docs/gl_objects/topics.rst @@ -50,3 +50,16 @@ Delete a topic:: Merge a source topic into a target topic:: gl.topics.merge(topic_id, target_topic_id) + +Set the avatar image for a topic:: + + # the avatar image can be passed as data (content of the file) or as a file + # object opened in binary mode + topic.avatar = open('path/to/file.png', 'rb') + topic.save() + +Remove the avatar image for a topic:: + + topic.avatar = "" + topic.save() + diff --git a/gitlab/utils.py b/gitlab/utils.py index 400793e24..bf37e09a5 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -188,6 +188,12 @@ def _transform_types( # if the type is FileAttribute we need to pass the data as file if isinstance(gitlab_attribute, types.FileAttribute) and transform_files: + # The GitLab API accepts mixed types + # (e.g. a file for avatar image or empty string for removing the avatar) + # So if string is empty, keep it in data dict + if isinstance(data[attr_name], str) and data[attr_name] == "": + continue + key = gitlab_attribute.get_file_name(attr_name) files[attr_name] = (key, data.pop(attr_name)) continue diff --git a/tests/functional/api/test_groups.py b/tests/functional/api/test_groups.py index 93200241a..2485ac660 100644 --- a/tests/functional/api/test_groups.py +++ b/tests/functional/api/test_groups.py @@ -138,6 +138,34 @@ def test_group_labels(group): label.delete() +def test_group_avatar_upload(gl, group, fixture_dir): + """Test uploading an avatar to a group.""" + # Upload avatar + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + group.avatar = avatar_file + group.save() + + # Verify the avatar was set + updated_group = gl.groups.get(group.id) + assert updated_group.avatar_url is not None + + +def test_group_avatar_remove(gl, group, fixture_dir): + """Test removing an avatar from a group.""" + # First set an avatar + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + group.avatar = avatar_file + group.save() + + # Now remove the avatar + group.avatar = "" + group.save() + + # Verify the avatar was removed + updated_group = gl.groups.get(group.id) + assert updated_group.avatar_url is None + + @pytest.mark.gitlab_premium @pytest.mark.xfail(reason="/ldap/groups endpoint not documented") def test_ldap_groups(gl): diff --git a/tests/functional/api/test_projects.py b/tests/functional/api/test_projects.py index 3572c6115..760f95336 100644 --- a/tests/functional/api/test_projects.py +++ b/tests/functional/api/test_projects.py @@ -48,6 +48,29 @@ def test_project_members(user, project): member.delete() +def test_project_avatar_upload(gl, project, fixture_dir): + """Test uploading an avatar to a project.""" + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + project.avatar = avatar_file + project.save() + + updated_project = gl.projects.get(project.id) + assert updated_project.avatar_url is not None + + +def test_project_avatar_remove(gl, project, fixture_dir): + """Test removing an avatar from a project.""" + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + project.avatar = avatar_file + project.save() + + project.avatar = "" + project.save() + + updated_project = gl.projects.get(project.id) + assert updated_project.avatar_url is None + + def test_project_badges(project): badge_image = "http://example.com" badge_link = "http://example/img.svg" diff --git a/tests/functional/api/test_topics.py b/tests/functional/api/test_topics.py index 1fb7c8d63..0ac318458 100644 --- a/tests/functional/api/test_topics.py +++ b/tests/functional/api/test_topics.py @@ -31,3 +31,48 @@ def test_topics(gl, gitlab_version): assert merged_topic["id"] == topic2.id topic2.delete() + + +def test_topic_avatar_upload(gl, fixture_dir): + """Test uploading an avatar to a topic.""" + + topic = gl.topics.create( + { + "name": "avatar-topic", + "description": "Topic with avatar", + "title": "Avatar Topic", + } + ) + + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + topic.avatar = avatar_file + topic.save() + + updated_topic = gl.topics.get(topic.id) + assert updated_topic.avatar_url is not None + + topic.delete() + + +def test_topic_avatar_remove(gl, fixture_dir): + """Test removing an avatar from a topic.""" + + topic = gl.topics.create( + { + "name": "avatar-topic-remove", + "description": "Remove avatar", + "title": "Remove Avatar", + } + ) + + with open(fixture_dir / "avatar.png", "rb") as avatar_file: + topic.avatar = avatar_file + topic.save() + + topic.avatar = "" + topic.save() + + updated_topic = gl.topics.get(topic.id) + assert updated_topic.avatar_url is None + + topic.delete() From af137ca1fc11504e517d3b5fc6c12e2b4b170d18 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 10:10:19 +0000 Subject: [PATCH 004/102] chore(deps): update all non-major dependencies --- .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 2 +- requirements-test.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ce6a33d0..da756c481 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -102,7 +102,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.0 + uses: codecov/codecov-action@v5.4.2 with: files: ./coverage.xml flags: unit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b1b6a779..01c2809c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 39.240.1 + rev: 39.253.1 hooks: - id: renovate-config-validator diff --git a/requirements-test.txt b/requirements-test.txt index 6beca2666..6d504f4da 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -9,5 +9,5 @@ pytest==8.3.5 PyYaml==6.0.2 responses==0.25.7 respx==0.22.0 -trio==0.29.0 +trio==0.30.0 wheel==0.45.1 From 159b9583bfc46b25ad9ebc9c18995235c142d91a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 02:58:13 +0000 Subject: [PATCH 005/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/test.yml | 12 ++++++------ .pre-commit-config.yaml | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a144b9725..c974f3a45 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: Install dependencies @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: Install dependencies diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f2d3c57f0..d16f7fe09 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4.2.2 with: fetch-depth: 0 - - uses: actions/setup-python@v5.5.0 + - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - run: pip install --upgrade tox diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index ae331e4bc..9fadeca81 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.2.2 - - uses: actions/setup-python@v5.5.0 + - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: install tox diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da756c481..29d7f0f44 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: ${{ matrix.python.version }} - name: Install dependencies @@ -69,7 +69,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: Install dependencies @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: Install dependencies @@ -114,7 +114,7 @@ jobs: name: Python wheel steps: - uses: actions/checkout@v4.2.2 - - uses: actions/setup-python@v5.5.0 + - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - name: Install dependencies @@ -133,10 +133,10 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up Python - uses: actions/setup-python@v5.5.0 + uses: actions/setup-python@v5.6.0 with: python-version: '3.13' - - uses: actions/download-artifact@v4.2.1 + - uses: actions/download-artifact@v4.3.0 with: name: dist path: dist diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01c2809c7..7b4b39fe9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 39.253.1 + rev: 39.261.4 hooks: - id: renovate-config-validator From 2e51cd5535512755e4ddd33168351c30de31bfc8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 07:54:48 +0000 Subject: [PATCH 006/102] chore(deps): update dependency types-setuptools to v79 --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index a997f6834..070fe8acb 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -11,4 +11,4 @@ responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250402 types-requests==2.32.0.20250328 -types-setuptools==78.1.0.20250329 +types-setuptools==79.0.0.20250422 From e54516f2cf21f73dbfe39437ff673a636e65e892 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 03:05:21 +0000 Subject: [PATCH 007/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 6 +++--- requirements-lint.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b4b39fe9..06e947d71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.0 + rev: v4.6.1 hooks: - id: commitizen stages: [commit-msg] @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v3.3.6 + rev: v3.3.7 hooks: - id: pylint additional_dependencies: @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 39.261.4 + rev: 39.264.0 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 070fe8acb..1632a5bbb 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,11 +1,11 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.6.0 +commitizen==4.6.1 flake8==7.2.0 isort==6.0.1 mypy==1.15.0 -pylint==3.3.6 +pylint==3.3.7 pytest==8.3.5 responses==0.25.7 respx==0.22.0 From 9ba9ac0818d4350741b17e2a022e816912601e34 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 05:26:09 +0000 Subject: [PATCH 008/102] chore(deps): update dependency types-setuptools to v80 --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 1632a5bbb..cec0bf3c2 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -11,4 +11,4 @@ responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250402 types-requests==2.32.0.20250328 -types-setuptools==79.0.0.20250422 +types-setuptools==80.3.0.20250505 From f55fa152cdccc0dd4815f17df9ff80628115667d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=89=E8=99=8E?= Date: Tue, 29 Apr 2025 00:00:04 +0800 Subject: [PATCH 009/102] docs(api-usage): fix GitLab API links to the publicly accessible URLs --- docs/api-usage.rst | 10 +++--- docs/cli-usage.rst | 4 +-- docs/gl_objects/access_requests.rst | 2 +- docs/gl_objects/appearance.rst | 2 +- docs/gl_objects/applications.rst | 2 +- docs/gl_objects/badges.rst | 4 +-- docs/gl_objects/boards.rst | 8 ++--- docs/gl_objects/branches.rst | 2 +- docs/gl_objects/bulk_imports.rst | 2 +- docs/gl_objects/ci_lint.rst | 2 +- docs/gl_objects/cluster_agents.rst | 2 +- docs/gl_objects/clusters.rst | 4 +-- docs/gl_objects/commits.rst | 6 ++-- docs/gl_objects/deploy_keys.rst | 4 +-- docs/gl_objects/deploy_tokens.rst | 6 ++-- docs/gl_objects/deployments.rst | 4 +-- docs/gl_objects/discussions.rst | 2 +- docs/gl_objects/draft_notes.rst | 2 +- docs/gl_objects/emojis.rst | 2 +- docs/gl_objects/environments.rst | 2 +- docs/gl_objects/epics.rst | 4 +-- docs/gl_objects/events.rst | 6 ++-- docs/gl_objects/features.rst | 2 +- docs/gl_objects/geo_nodes.rst | 2 +- docs/gl_objects/group_access_tokens.rst | 2 +- docs/gl_objects/groups.rst | 16 +++++----- docs/gl_objects/invitations.rst | 2 +- docs/gl_objects/issues.rst | 10 +++--- docs/gl_objects/iterations.rst | 2 +- docs/gl_objects/job_token_scope.rst | 2 +- docs/gl_objects/keys.rst | 2 +- docs/gl_objects/labels.rst | 4 +-- docs/gl_objects/member_roles.rst | 4 +-- docs/gl_objects/merge_request_approvals.rst | 6 ++-- docs/gl_objects/merge_requests.rst | 10 +++--- docs/gl_objects/merge_trains.rst | 2 +- docs/gl_objects/messages.rst | 2 +- docs/gl_objects/milestones.rst | 6 ++-- docs/gl_objects/namespaces.rst | 2 +- docs/gl_objects/notes.rst | 2 +- docs/gl_objects/notifications.rst | 2 +- docs/gl_objects/packages.rst | 10 +++--- docs/gl_objects/pagesdomains.rst | 6 ++-- docs/gl_objects/personal_access_tokens.rst | 4 +-- docs/gl_objects/pipelines_and_jobs.rst | 16 +++++----- docs/gl_objects/project_access_tokens.rst | 2 +- docs/gl_objects/projects.rst | 32 +++++++++---------- docs/gl_objects/protected_branches.rst | 2 +- .../protected_container_repositories.rst | 2 +- docs/gl_objects/protected_environments.rst | 2 +- docs/gl_objects/protected_packages.rst | 2 +- docs/gl_objects/pull_mirror.rst | 2 +- docs/gl_objects/releases.rst | 4 +-- docs/gl_objects/remote_mirrors.rst | 2 +- docs/gl_objects/repositories.rst | 2 +- docs/gl_objects/repository_tags.rst | 4 +-- docs/gl_objects/resource_groups.rst | 2 +- docs/gl_objects/runners.rst | 6 ++-- docs/gl_objects/search.rst | 2 +- docs/gl_objects/secure_files.rst | 2 +- docs/gl_objects/settings.rst | 2 +- docs/gl_objects/sidekiq.rst | 2 +- docs/gl_objects/snippets.rst | 2 +- docs/gl_objects/statistics.rst | 2 +- docs/gl_objects/status_checks.rst | 2 +- docs/gl_objects/system_hooks.rst | 2 +- docs/gl_objects/templates.rst | 10 +++--- docs/gl_objects/todos.rst | 2 +- docs/gl_objects/topics.rst | 2 +- docs/gl_objects/users.rst | 28 ++++++++-------- docs/gl_objects/variables.rst | 10 +++--- docs/gl_objects/wikis.rst | 8 ++--- 72 files changed, 169 insertions(+), 169 deletions(-) diff --git a/docs/api-usage.rst b/docs/api-usage.rst index eca02d483..38836f20f 100644 --- a/docs/api-usage.rst +++ b/docs/api-usage.rst @@ -16,7 +16,7 @@ To connect to GitLab.com or another GitLab instance, create a ``gitlab.Gitlab`` access token. For the full list of available options and how to obtain these tokens, please see - https://docs.gitlab.com/ee/api/rest/authentication.html. + https://docs.gitlab.com/api/rest/authentication/. .. code-block:: python @@ -39,7 +39,7 @@ To connect to GitLab.com or another GitLab instance, create a ``gitlab.Gitlab`` # job token authentication (to be used in CI) # bear in mind the limitations of the API endpoints it supports: - # https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html + # https://docs.gitlab.com/ci/jobs/ci_job_token import os gl = gitlab.Gitlab('https://gitlab.example.com', job_token=os.environ['CI_JOB_TOKEN']) @@ -83,7 +83,7 @@ Note on password authentication ------------------------------- GitLab has long removed password-based basic authentication. You can currently still use the -`resource owner password credentials `_ +`resource owner password credentials `_ flow to obtain an OAuth token. However, we do not recommend this as it will not work with 2FA enabled, and GitLab is removing @@ -364,7 +364,7 @@ order options. At the time of writing, only ``order_by="id"`` works. gl.projects.list(get_all=True) Reference: -https://docs.gitlab.com/ce/api/README.html#keyset-based-pagination +https://docs.gitlab.com/api/rest/#keyset-based-pagination ``list()`` methods can also return a generator object, by passing the argument ``iterator=True``, which will handle the next calls to the API when required. This @@ -392,7 +392,7 @@ The generator exposes extra listing information as received from the server: ``total_pages`` and ``total`` will have a value of ``None``. For more information see: - https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers + https://docs.gitlab.com/user/gitlab_com/index#pagination-response-headers .. note:: Prior to python-gitlab 3.6.0 the argument ``as_list`` was used instead of diff --git a/docs/cli-usage.rst b/docs/cli-usage.rst index 0be22f5e2..d56388e37 100644 --- a/docs/cli-usage.rst +++ b/docs/cli-usage.rst @@ -165,14 +165,14 @@ We recommend that you use `Credential helpers`_ to securely store your tokens. * - ``private_token`` - Your user token. Login/password is not supported. Refer to `the official documentation - `__ + `__ to learn how to obtain a token. * - ``oauth_token`` - An Oauth token for authentication. The Gitlab server must be configured to support this authentication method. * - ``job_token`` - Your job token. See `the official documentation - `__ + `__ to learn how to obtain a token. * - ``api_version`` - GitLab API version to use. Only ``4`` is available since 1.5.0. diff --git a/docs/gl_objects/access_requests.rst b/docs/gl_objects/access_requests.rst index 339c7d172..c997fe0d7 100644 --- a/docs/gl_objects/access_requests.rst +++ b/docs/gl_objects/access_requests.rst @@ -25,7 +25,7 @@ References + :class:`gitlab.v4.objects.GroupAccessRequestManager` + :attr:`gitlab.v4.objects.Group.accessrequests` -* GitLab API: https://docs.gitlab.com/ce/api/access_requests.html +* GitLab API: https://docs.gitlab.com/api/access_requests Examples -------- diff --git a/docs/gl_objects/appearance.rst b/docs/gl_objects/appearance.rst index 0c0526817..611413d73 100644 --- a/docs/gl_objects/appearance.rst +++ b/docs/gl_objects/appearance.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ApplicationAppearanceManager` + :attr:`gitlab.Gitlab.appearance` -* GitLab API: https://docs.gitlab.com/ce/api/appearance.html +* GitLab API: https://docs.gitlab.com/api/appearance Examples -------- diff --git a/docs/gl_objects/applications.rst b/docs/gl_objects/applications.rst index 24de3b2ba..fea051b25 100644 --- a/docs/gl_objects/applications.rst +++ b/docs/gl_objects/applications.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ApplicationManager` + :attr:`gitlab.Gitlab.applications` -* GitLab API: https://docs.gitlab.com/ce/api/applications.html +* GitLab API: https://docs.gitlab.com/api/applications Examples -------- diff --git a/docs/gl_objects/badges.rst b/docs/gl_objects/badges.rst index 0f650d460..c84308032 100644 --- a/docs/gl_objects/badges.rst +++ b/docs/gl_objects/badges.rst @@ -18,8 +18,8 @@ Reference * GitLab API: - + https://docs.gitlab.com/ce/api/group_badges.html - + https://docs.gitlab.com/ce/api/project_badges.html + + https://docs.gitlab.com/api/group_badges + + https://docs.gitlab.com/api/project_badges Examples -------- diff --git a/docs/gl_objects/boards.rst b/docs/gl_objects/boards.rst index abab5b91b..5031e4bd5 100644 --- a/docs/gl_objects/boards.rst +++ b/docs/gl_objects/boards.rst @@ -23,8 +23,8 @@ Reference * GitLab API: - + https://docs.gitlab.com/ce/api/boards.html - + https://docs.gitlab.com/ce/api/group_boards.html + + https://docs.gitlab.com/api/boards + + https://docs.gitlab.com/api/group_boards Examples -------- @@ -72,8 +72,8 @@ Reference * GitLab API: - + https://docs.gitlab.com/ce/api/boards.html - + https://docs.gitlab.com/ce/api/group_boards.html + + https://docs.gitlab.com/api/boards + + https://docs.gitlab.com/api/group_boards Examples -------- diff --git a/docs/gl_objects/branches.rst b/docs/gl_objects/branches.rst index 1c0d89d0b..823d98b85 100644 --- a/docs/gl_objects/branches.rst +++ b/docs/gl_objects/branches.rst @@ -11,7 +11,7 @@ References + :class:`gitlab.v4.objects.ProjectBranchManager` + :attr:`gitlab.v4.objects.Project.branches` -* GitLab API: https://docs.gitlab.com/ce/api/branches.html +* GitLab API: https://docs.gitlab.com/api/branches Examples -------- diff --git a/docs/gl_objects/bulk_imports.rst b/docs/gl_objects/bulk_imports.rst index b5b3ef89c..6b1458a13 100644 --- a/docs/gl_objects/bulk_imports.rst +++ b/docs/gl_objects/bulk_imports.rst @@ -17,7 +17,7 @@ References + :class:`gitlab.v4.objects.BulkImportEntityManager` + :attr:`gitlab.v4.objects.BulkImport.entities` -* GitLab API: https://docs.gitlab.com/ee/api/bulk_imports.html +* GitLab API: https://docs.gitlab.com/api/bulk_imports Examples -------- diff --git a/docs/gl_objects/ci_lint.rst b/docs/gl_objects/ci_lint.rst index ad2d875e9..b44b09486 100644 --- a/docs/gl_objects/ci_lint.rst +++ b/docs/gl_objects/ci_lint.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectCiLintManager` + :attr:`gitlab.v4.objects.Project.ci_lint` -* GitLab API: https://docs.gitlab.com/ee/api/lint.html +* GitLab API: https://docs.gitlab.com/api/lint Examples --------- diff --git a/docs/gl_objects/cluster_agents.rst b/docs/gl_objects/cluster_agents.rst index 9e050b1ed..b9810959d 100644 --- a/docs/gl_objects/cluster_agents.rst +++ b/docs/gl_objects/cluster_agents.rst @@ -17,7 +17,7 @@ Reference + :class:`gitlab.v4.objects.ProjectClusterAgentManager` + :attr:`gitlab.v4.objects.Project.cluster_agents` -* GitLab API: https://docs.gitlab.com/ee/api/cluster_agents.html +* GitLab API: https://docs.gitlab.com/api/cluster_agents Examples -------- diff --git a/docs/gl_objects/clusters.rst b/docs/gl_objects/clusters.rst index 14b64818c..7cf413bc2 100644 --- a/docs/gl_objects/clusters.rst +++ b/docs/gl_objects/clusters.rst @@ -19,8 +19,8 @@ Reference + :class:`gitlab.v4.objects.GroupClusterManager` + :attr:`gitlab.v4.objects.Group.clusters` -* GitLab API: https://docs.gitlab.com/ee/api/project_clusters.html -* GitLab API: https://docs.gitlab.com/ee/api/group_clusters.html +* GitLab API: https://docs.gitlab.com/api/project_clusters +* GitLab API: https://docs.gitlab.com/api/group_clusters Examples -------- diff --git a/docs/gl_objects/commits.rst b/docs/gl_objects/commits.rst index c810442c8..0c612f3de 100644 --- a/docs/gl_objects/commits.rst +++ b/docs/gl_objects/commits.rst @@ -33,7 +33,7 @@ List all commits for a project (see :ref:`pagination`) on all branches: Create a commit:: - # See https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions + # See https://docs.gitlab.com/api/commits#create-a-commit-with-multiple-files-and-actions # for actions detail data = { 'branch': 'main', @@ -98,7 +98,7 @@ Reference + :class:`gitlab.v4.objects.ProjectCommitCommentManager` + :attr:`gitlab.v4.objects.ProjectCommit.comments` -* GitLab API: https://docs.gitlab.com/ce/api/commits.html +* GitLab API: https://docs.gitlab.com/api/commits Examples -------- @@ -129,7 +129,7 @@ Reference + :class:`gitlab.v4.objects.ProjectCommitStatusManager` + :attr:`gitlab.v4.objects.ProjectCommit.statuses` -* GitLab API: https://docs.gitlab.com/ce/api/commits.html +* GitLab API: https://docs.gitlab.com/api/commits Examples -------- diff --git a/docs/gl_objects/deploy_keys.rst b/docs/gl_objects/deploy_keys.rst index 65fa01a3d..9f91fea0f 100644 --- a/docs/gl_objects/deploy_keys.rst +++ b/docs/gl_objects/deploy_keys.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.DeployKeyManager` + :attr:`gitlab.Gitlab.deploykeys` -* GitLab API: https://docs.gitlab.com/ce/api/deploy_keys.html +* GitLab API: https://docs.gitlab.com/api/deploy_keys Examples -------- @@ -41,7 +41,7 @@ Reference + :class:`gitlab.v4.objects.ProjectKeyManager` + :attr:`gitlab.v4.objects.Project.keys` -* GitLab API: https://docs.gitlab.com/ce/api/deploy_keys.html +* GitLab API: https://docs.gitlab.com/api/deploy_keys Examples -------- diff --git a/docs/gl_objects/deploy_tokens.rst b/docs/gl_objects/deploy_tokens.rst index 8f06254d2..80c00803a 100644 --- a/docs/gl_objects/deploy_tokens.rst +++ b/docs/gl_objects/deploy_tokens.rst @@ -19,7 +19,7 @@ Reference + :class:`gitlab.v4.objects.DeployTokenManager` + :attr:`gitlab.Gitlab.deploytokens` -* GitLab API: https://docs.gitlab.com/ce/api/deploy_tokens.html +* GitLab API: https://docs.gitlab.com/api/deploy_tokens Examples -------- @@ -45,7 +45,7 @@ Reference + :class:`gitlab.v4.objects.ProjectDeployTokenManager` + :attr:`gitlab.v4.objects.Project.deploytokens` -* GitLab API: https://docs.gitlab.com/ce/api/deploy_tokens.html#project-deploy-tokens +* GitLab API: https://docs.gitlab.com/api/deploy_tokens#project-deploy-tokens Examples -------- @@ -102,7 +102,7 @@ Reference + :class:`gitlab.v4.objects.GroupDeployTokenManager` + :attr:`gitlab.v4.objects.Group.deploytokens` -* GitLab API: https://docs.gitlab.com/ce/api/deploy_tokens.html#group-deploy-tokens +* GitLab API: https://docs.gitlab.com/api/deploy_tokens#group-deploy-tokens Examples -------- diff --git a/docs/gl_objects/deployments.rst b/docs/gl_objects/deployments.rst index 10de426c2..4be927af7 100644 --- a/docs/gl_objects/deployments.rst +++ b/docs/gl_objects/deployments.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ProjectDeploymentManager` + :attr:`gitlab.v4.objects.Project.deployments` -* GitLab API: https://docs.gitlab.com/ce/api/deployments.html +* GitLab API: https://docs.gitlab.com/api/deployments Examples -------- @@ -64,7 +64,7 @@ Reference + :class:`gitlab.v4.objects.ProjectDeploymentMergeRequestManager` + :attr:`gitlab.v4.objects.ProjectDeployment.mergerequests` -* GitLab API: https://docs.gitlab.com/ee/api/deployments.html#list-of-merge-requests-associated-with-a-deployment +* GitLab API: https://docs.gitlab.com/api/deployments#list-of-merge-requests-associated-with-a-deployment Examples -------- diff --git a/docs/gl_objects/discussions.rst b/docs/gl_objects/discussions.rst index 6d493044b..f64a98b3d 100644 --- a/docs/gl_objects/discussions.rst +++ b/docs/gl_objects/discussions.rst @@ -37,7 +37,7 @@ Reference + :class:`gitlab.v4.objects.ProjectSnippetDiscussionNoteManager` + :attr:`gitlab.v4.objects.ProjectSnippet.notes` -* GitLab API: https://docs.gitlab.com/ce/api/discussions.html +* GitLab API: https://docs.gitlab.com/api/discussions Examples ======== diff --git a/docs/gl_objects/draft_notes.rst b/docs/gl_objects/draft_notes.rst index 5cc84eeb2..8f33de6e6 100644 --- a/docs/gl_objects/draft_notes.rst +++ b/docs/gl_objects/draft_notes.rst @@ -18,7 +18,7 @@ Reference + :attr:`gitlab.v4.objects.ProjectMergeRequest.draft_notes` -* GitLab API: https://docs.gitlab.com/ee/api/draft_notes.html +* GitLab API: https://docs.gitlab.com/api/draft_notes Examples -------- diff --git a/docs/gl_objects/emojis.rst b/docs/gl_objects/emojis.rst index f19f3b1d0..1675916e1 100644 --- a/docs/gl_objects/emojis.rst +++ b/docs/gl_objects/emojis.rst @@ -21,7 +21,7 @@ Reference + :class:`gitlab.v4.objects.ProjectSnippetNoteAwardEmojiManager` -* GitLab API: https://docs.gitlab.com/ce/api/award_emoji.html +* GitLab API: https://docs.gitlab.com/api/emoji_reactions/ Examples -------- diff --git a/docs/gl_objects/environments.rst b/docs/gl_objects/environments.rst index 164a9c9a0..382820b76 100644 --- a/docs/gl_objects/environments.rst +++ b/docs/gl_objects/environments.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ProjectEnvironmentManager` + :attr:`gitlab.v4.objects.Project.environments` -* GitLab API: https://docs.gitlab.com/ce/api/environments.html +* GitLab API: https://docs.gitlab.com/api/environments Examples -------- diff --git a/docs/gl_objects/epics.rst b/docs/gl_objects/epics.rst index 33ef2b848..7e43aaa8e 100644 --- a/docs/gl_objects/epics.rst +++ b/docs/gl_objects/epics.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.GroupEpicManager` + :attr:`gitlab.Gitlab.Group.epics` -* GitLab API: https://docs.gitlab.com/ee/api/epics.html (EE feature) +* GitLab API: https://docs.gitlab.com/api/epics (EE feature) Examples -------- @@ -53,7 +53,7 @@ Reference + :class:`gitlab.v4.objects.GroupEpicIssueManager` + :attr:`gitlab.Gitlab.GroupEpic.issues` -* GitLab API: https://docs.gitlab.com/ee/api/epic_issues.html (EE feature) +* GitLab API: https://docs.gitlab.com/api/epic_issues (EE feature) Examples -------- diff --git a/docs/gl_objects/events.rst b/docs/gl_objects/events.rst index 68a55b92f..108f6cedb 100644 --- a/docs/gl_objects/events.rst +++ b/docs/gl_objects/events.rst @@ -20,7 +20,7 @@ Reference + :class:`gitlab.v4.objects.UserEventManager` + :attr:`gitlab.v4.objects.User.events` -* GitLab API: https://docs.gitlab.com/ce/api/events.html +* GitLab API: https://docs.gitlab.com/api/events/ Examples -------- @@ -29,7 +29,7 @@ You can list events for an entire Gitlab instance (admin), users and projects. You can filter you events you want to retrieve using the ``action`` and ``target_type`` attributes. The possible values for these attributes are available on `the gitlab documentation -`_. +`_. List all the events (paginated):: @@ -58,7 +58,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeRequestResourceStateEventManager` + :attr:`gitlab.v4.objects.ProjectMergeRequest.resourcestateevents` -* GitLab API: https://docs.gitlab.com/ee/api/resource_state_events.html +* GitLab API: https://docs.gitlab.com/api/resource_state_events Examples -------- diff --git a/docs/gl_objects/features.rst b/docs/gl_objects/features.rst index 6ed758e97..d7552041d 100644 --- a/docs/gl_objects/features.rst +++ b/docs/gl_objects/features.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.FeatureManager` + :attr:`gitlab.Gitlab.features` -* GitLab API: https://docs.gitlab.com/ce/api/features.html +* GitLab API: https://docs.gitlab.com/api/features Examples -------- diff --git a/docs/gl_objects/geo_nodes.rst b/docs/gl_objects/geo_nodes.rst index 878798262..4eb1932ed 100644 --- a/docs/gl_objects/geo_nodes.rst +++ b/docs/gl_objects/geo_nodes.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.GeoNodeManager` + :attr:`gitlab.Gitlab.geonodes` -* GitLab API: https://docs.gitlab.com/ee/api/geo_nodes.html (EE feature) +* GitLab API: https://docs.gitlab.com/api/geo_nodes (EE feature) Examples -------- diff --git a/docs/gl_objects/group_access_tokens.rst b/docs/gl_objects/group_access_tokens.rst index b3b0132d4..60519e2ab 100644 --- a/docs/gl_objects/group_access_tokens.rst +++ b/docs/gl_objects/group_access_tokens.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.GroupAccessTokenManager` + :attr:`gitlab.Gitlab.group_access_tokens` -* GitLab API: https://docs.gitlab.com/ee/api/group_access_tokens.html +* GitLab API: https://docs.gitlab.com/api/group_access_tokens Examples -------- diff --git a/docs/gl_objects/groups.rst b/docs/gl_objects/groups.rst index 0d49eb0bb..7824ef31b 100644 --- a/docs/gl_objects/groups.rst +++ b/docs/gl_objects/groups.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.GroupManager` + :attr:`gitlab.Gitlab.groups` -* GitLab API: https://docs.gitlab.com/ce/api/groups.html +* GitLab API: https://docs.gitlab.com/api/groups Examples -------- @@ -63,7 +63,7 @@ Create a group:: .. warning:: On GitLab.com, creating top-level groups is currently - `not permitted using the API `_. + `not permitted using the API `_. You can only use the API to create subgroups. Create a subgroup under an existing group:: @@ -121,7 +121,7 @@ Reference + :attr:`gitlab.v4.objects.Group.imports` + :attr:`gitlab.v4.objects.GroupManager.import_group` -* GitLab API: https://docs.gitlab.com/ce/api/group_import_export.html +* GitLab API: https://docs.gitlab.com/api/group_import_export Examples -------- @@ -224,7 +224,7 @@ Reference + :class:`gitlab.v4.objects.GroupCustomAttributeManager` + :attr:`gitlab.v4.objects.Group.customattributes` -* GitLab API: https://docs.gitlab.com/ce/api/custom_attributes.html +* GitLab API: https://docs.gitlab.com/api/custom_attributes Examples -------- @@ -277,7 +277,7 @@ Reference + :attr:`gitlab.v4.objects.Group.members_all` + :attr:`gitlab.v4.objects.Group.billable_members` -* GitLab API: https://docs.gitlab.com/ce/api/members.html +* GitLab API: https://docs.gitlab.com/api/members Billable group members are only available in GitLab EE. @@ -402,7 +402,7 @@ Reference + :class:`gitlab.v4.objects.GroupHookManager` + :attr:`gitlab.v4.objects.Group.hooks` -* GitLab API: https://docs.gitlab.com/ce/api/groups.html#hooks +* GitLab API: https://docs.gitlab.com/api/groups#hooks Examples -------- @@ -446,7 +446,7 @@ Reference + :class:`gitlab.v4.objects.GroupPushRulesManager` + :attr:`gitlab.v4.objects.Group.pushrules` -* GitLab API: https://docs.gitlab.com/ee/api/groups.html#push-rules +* GitLab API: https://docs.gitlab.com/api/groups#push-rules Examples --------- @@ -480,7 +480,7 @@ Reference + :class:`gitlab.v4.objects.GroupServiceAccountManager` + :attr:`gitlab.v4.objects.Group.serviceaccounts` -* GitLab API: https://docs.gitlab.com/ee/api/groups.html#service-accounts +* GitLab API: https://docs.gitlab.com/api/groups#service-accounts Examples --------- diff --git a/docs/gl_objects/invitations.rst b/docs/gl_objects/invitations.rst index 795828b3c..e88564f6d 100644 --- a/docs/gl_objects/invitations.rst +++ b/docs/gl_objects/invitations.rst @@ -16,7 +16,7 @@ Reference + :class:`gitlab.v4.objects.ProjectInvitationManager` + :attr:`gitlab.v4.objects.Project.invitations` -* GitLab API: https://docs.gitlab.com/ce/api/invitations.html +* GitLab API: https://docs.gitlab.com/api/invitations Examples -------- diff --git a/docs/gl_objects/issues.rst b/docs/gl_objects/issues.rst index 1b7e6472e..ea17af728 100644 --- a/docs/gl_objects/issues.rst +++ b/docs/gl_objects/issues.rst @@ -16,7 +16,7 @@ Reference + :class:`gitlab.v4.objects.IssueManager` + :attr:`gitlab.Gitlab.issues` -* GitLab API: https://docs.gitlab.com/ce/api/issues.html +* GitLab API: https://docs.gitlab.com/api/issues Examples -------- @@ -55,7 +55,7 @@ Reference + :class:`gitlab.v4.objects.GroupIssueManager` + :attr:`gitlab.v4.objects.Group.issues` -* GitLab API: https://docs.gitlab.com/ce/api/issues.html +* GitLab API: https://docs.gitlab.com/api/issues Examples -------- @@ -91,7 +91,7 @@ Reference + :class:`gitlab.v4.objects.ProjectIssueManager` + :attr:`gitlab.v4.objects.Project.issues` -* GitLab API: https://docs.gitlab.com/ce/api/issues.html +* GitLab API: https://docs.gitlab.com/api/issues Examples -------- @@ -223,7 +223,7 @@ Reference + :class:`gitlab.v4.objects.ProjectIssueLinkManager` + :attr:`gitlab.v4.objects.ProjectIssue.links` -* GitLab API: https://docs.gitlab.com/ee/api/issue_links.html +* GitLab API: https://docs.gitlab.com/api/issue_links Examples -------- @@ -268,7 +268,7 @@ Reference + :attr:`gitlab.v4.objects.Project.issues_statistics` -* GitLab API: https://docs.gitlab.com/ce/api/issues_statistics.htm +* GitLab API: https://docs.gitlab.com/api/issues_statistics/ Examples --------- diff --git a/docs/gl_objects/iterations.rst b/docs/gl_objects/iterations.rst index 812dece6d..3f5e763bf 100644 --- a/docs/gl_objects/iterations.rst +++ b/docs/gl_objects/iterations.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectIterationManager` + :attr:`gitlab.v4.objects.Project.iterations` -* GitLab API: https://docs.gitlab.com/ee/api/iterations.html +* GitLab API: https://docs.gitlab.com/api/iterations Examples -------- diff --git a/docs/gl_objects/job_token_scope.rst b/docs/gl_objects/job_token_scope.rst index 22fbbccea..0d7771d9f 100644 --- a/docs/gl_objects/job_token_scope.rst +++ b/docs/gl_objects/job_token_scope.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ProjectJobTokenScopeManager` + :attr:`gitlab.v4.objects.Project.job_token_scope` -* GitLab API: https://docs.gitlab.com/ee/api/project_job_token_scopes.html +* GitLab API: https://docs.gitlab.com/api/project_job_token_scopes Examples -------- diff --git a/docs/gl_objects/keys.rst b/docs/gl_objects/keys.rst index 6d3521809..4450ed708 100644 --- a/docs/gl_objects/keys.rst +++ b/docs/gl_objects/keys.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.KeyManager` + :attr:`gitlab.Gitlab.keys` -* GitLab API: https://docs.gitlab.com/ce/api/keys.html +* GitLab API: https://docs.gitlab.com/api/keys Examples -------- diff --git a/docs/gl_objects/labels.rst b/docs/gl_objects/labels.rst index b3ae9562b..7fa042fab 100644 --- a/docs/gl_objects/labels.rst +++ b/docs/gl_objects/labels.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectLabelManager` + :attr:`gitlab.v4.objects.Project.labels` -* GitLab API: https://docs.gitlab.com/ce/api/labels.html +* GitLab API: https://docs.gitlab.com/api/labels Examples -------- @@ -79,7 +79,7 @@ Reference + :class:`gitlab.v4.objects.GroupEpicResourceLabelEventManager` + :attr:`gitlab.v4.objects.GroupEpic.resourcelabelevents` -* GitLab API: https://docs.gitlab.com/ee/api/resource_label_events.html +* GitLab API: https://docs.gitlab.com/api/resource_label_events Examples -------- diff --git a/docs/gl_objects/member_roles.rst b/docs/gl_objects/member_roles.rst index ffcd3f847..1c4aa07c5 100644 --- a/docs/gl_objects/member_roles.rst +++ b/docs/gl_objects/member_roles.rst @@ -21,7 +21,7 @@ Reference * GitLab API - + https://docs.gitlab.com/ee/api/member_roles.html#manage-instance-member-roles + + https://docs.gitlab.com/api/member_roles#manage-instance-member-roles Examples -------- @@ -52,7 +52,7 @@ Reference * GitLab API - + https://docs.gitlab.com/ee/api/member_roles.html#manage-group-member-roles + + https://docs.gitlab.com/api/member_roles#manage-group-member-roles Examples -------- diff --git a/docs/gl_objects/merge_request_approvals.rst b/docs/gl_objects/merge_request_approvals.rst index 5925b1a4d..4f9d561bb 100644 --- a/docs/gl_objects/merge_request_approvals.rst +++ b/docs/gl_objects/merge_request_approvals.rst @@ -15,7 +15,7 @@ References + :class:`gitlab.v4.objects.GroupApprovalRule` + :class:`gitlab.v4.objects.GroupApprovalRuleManager` -* GitLab API: https://docs.gitlab.com/ee/api/merge_request_approvals.html +* GitLab API: https://docs.gitlab.com/api/merge_request_approvals Examples -------- @@ -55,7 +55,7 @@ References + :class:`gitlab.v4.objects.ProjectApprovalRuleManager` + :attr:`gitlab.v4.objects.Project.approvals` -* GitLab API: https://docs.gitlab.com/ee/api/merge_request_approvals.html +* GitLab API: https://docs.gitlab.com/api/merge_request_approvals Examples -------- @@ -101,7 +101,7 @@ References + :class:`gitlab.v4.objects.ProjectMergeRequestApprovalStateManager` + :attr:`gitlab.v4.objects.ProjectMergeRequest.approval_state` -* GitLab API: https://docs.gitlab.com/ee/api/merge_request_approvals.html +* GitLab API: https://docs.gitlab.com/api/merge_request_approvals Examples -------- diff --git a/docs/gl_objects/merge_requests.rst b/docs/gl_objects/merge_requests.rst index 716b0e5e3..0bb861c72 100644 --- a/docs/gl_objects/merge_requests.rst +++ b/docs/gl_objects/merge_requests.rst @@ -25,7 +25,7 @@ Reference + :class:`gitlab.v4.objects.MergeRequestManager` + :attr:`gitlab.Gitlab.mergerequests` -* GitLab API: https://docs.gitlab.com/ce/api/merge_requests.html +* GitLab API: https://docs.gitlab.com/api/merge_requests Examples -------- @@ -67,7 +67,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeRequestManager` + :attr:`gitlab.v4.objects.Project.mergerequests` -* GitLab API: https://docs.gitlab.com/ce/api/merge_requests.html +* GitLab API: https://docs.gitlab.com/api/merge_requests Examples -------- @@ -84,7 +84,7 @@ You can filter and sort the returned list with the following parameters: * ``sort``: sort order (``asc`` or ``desc``) You can find a full updated list of parameters here: -https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-requests +https://docs.gitlab.com/api/merge_requests#list-merge-requests For example:: @@ -221,7 +221,7 @@ Get status of a rebase for an MR:: print(mr.rebase_in_progress, mr.merge_error) For more info see: -https://docs.gitlab.com/ee/api/merge_requests.html#rebase-a-merge-request +https://docs.gitlab.com/api/merge_requests#rebase-a-merge-request Attempt to merge changes between source and target branch:: @@ -240,7 +240,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeRequestPipelineManager` + :attr:`gitlab.v4.objects.ProjectMergeRequest.pipelines` -* GitLab API: https://docs.gitlab.com/ee/api/merge_requests.html#list-mr-pipelines +* GitLab API: https://docs.gitlab.com/api/merge_requests#list-mr-pipelines Examples -------- diff --git a/docs/gl_objects/merge_trains.rst b/docs/gl_objects/merge_trains.rst index c7754727d..6d98e04d8 100644 --- a/docs/gl_objects/merge_trains.rst +++ b/docs/gl_objects/merge_trains.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeTrainManager` + :attr:`gitlab.v4.objects.Project.merge_trains` -* GitLab API: https://docs.gitlab.com/ee/api/merge_trains.html +* GitLab API: https://docs.gitlab.com/api/merge_trains Examples -------- diff --git a/docs/gl_objects/messages.rst b/docs/gl_objects/messages.rst index fa9c229fd..a7dbabbe7 100644 --- a/docs/gl_objects/messages.rst +++ b/docs/gl_objects/messages.rst @@ -15,7 +15,7 @@ References + :class:`gitlab.v4.objects.BroadcastMessageManager` + :attr:`gitlab.Gitlab.broadcastmessages` -* GitLab API: https://docs.gitlab.com/ce/api/broadcast_messages.html +* GitLab API: https://docs.gitlab.com/api/broadcast_messages Examples -------- diff --git a/docs/gl_objects/milestones.rst b/docs/gl_objects/milestones.rst index 4a1a5971e..7a02859db 100644 --- a/docs/gl_objects/milestones.rst +++ b/docs/gl_objects/milestones.rst @@ -20,8 +20,8 @@ Reference * GitLab API: - + https://docs.gitlab.com/ce/api/milestones.html - + https://docs.gitlab.com/ce/api/group_milestones.html + + https://docs.gitlab.com/api/milestones + + https://docs.gitlab.com/api/group_milestones Examples -------- @@ -95,7 +95,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeRequestResourceMilestoneEventManager` + :attr:`gitlab.v4.objects.ProjectMergeRequest.resourcemilestoneevents` -* GitLab API: https://docs.gitlab.com/ee/api/resource_milestone_events.html +* GitLab API: https://docs.gitlab.com/api/resource_milestone_events Examples -------- diff --git a/docs/gl_objects/namespaces.rst b/docs/gl_objects/namespaces.rst index bcfa5d2db..7c8eeb5e6 100644 --- a/docs/gl_objects/namespaces.rst +++ b/docs/gl_objects/namespaces.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.NamespaceManager` + :attr:`gitlab.Gitlab.namespaces` -* GitLab API: https://docs.gitlab.com/ce/api/namespaces.html +* GitLab API: https://docs.gitlab.com/api/namespaces Examples -------- diff --git a/docs/gl_objects/notes.rst b/docs/gl_objects/notes.rst index 86c8b324d..d9c3d6824 100644 --- a/docs/gl_objects/notes.rst +++ b/docs/gl_objects/notes.rst @@ -36,7 +36,7 @@ Reference + :class:`gitlab.v4.objects.ProjectSnippetNoteManager` + :attr:`gitlab.v4.objects.ProjectSnippet.notes` -* GitLab API: https://docs.gitlab.com/ce/api/notes.html +* GitLab API: https://docs.gitlab.com/api/notes Examples -------- diff --git a/docs/gl_objects/notifications.rst b/docs/gl_objects/notifications.rst index bc97b1ae9..3c5c7bd33 100644 --- a/docs/gl_objects/notifications.rst +++ b/docs/gl_objects/notifications.rst @@ -30,7 +30,7 @@ Reference + :class:`gitlab.v4.objects.ProjectNotificationSettingsManager` + :attr:`gitlab.v4.objects.Project.notificationsettings` -* GitLab API: https://docs.gitlab.com/ce/api/notification_settings.html +* GitLab API: https://docs.gitlab.com/api/notification_settings Examples -------- diff --git a/docs/gl_objects/packages.rst b/docs/gl_objects/packages.rst index cd101500f..369f8f9f4 100644 --- a/docs/gl_objects/packages.rst +++ b/docs/gl_objects/packages.rst @@ -17,7 +17,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPackageManager` + :attr:`gitlab.v4.objects.Project.packages` -* GitLab API: https://docs.gitlab.com/ee/api/packages.html#within-a-project +* GitLab API: https://docs.gitlab.com/api/packages#within-a-project Examples -------- @@ -53,7 +53,7 @@ Reference + :class:`gitlab.v4.objects.GroupPackageManager` + :attr:`gitlab.v4.objects.Group.packages` -* GitLab API: https://docs.gitlab.com/ee/api/packages.html#within-a-group +* GitLab API: https://docs.gitlab.com/api/packages#within-a-group Examples -------- @@ -79,7 +79,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPackageFileManager` + :attr:`gitlab.v4.objects.ProjectPackage.package_files` -* GitLab API: https://docs.gitlab.com/ee/api/packages.html#list-package-files +* GitLab API: https://docs.gitlab.com/api/packages#list-package-files Examples -------- @@ -107,7 +107,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPackagePipelineManager` + :attr:`gitlab.v4.objects.ProjectPackage.pipelines` -* GitLab API: https://docs.gitlab.com/ee/api/packages.html#list-package-pipelines +* GitLab API: https://docs.gitlab.com/api/packages#list-package-pipelines Examples -------- @@ -131,7 +131,7 @@ Reference + :class:`gitlab.v4.objects.GenericPackageManager` + :attr:`gitlab.v4.objects.Project.generic_packages` -* GitLab API: https://docs.gitlab.com/ee/user/packages/generic_packages +* GitLab API: https://docs.gitlab.com/user/packages/generic_packages Examples -------- diff --git a/docs/gl_objects/pagesdomains.rst b/docs/gl_objects/pagesdomains.rst index f6c1e7696..85887cf02 100644 --- a/docs/gl_objects/pagesdomains.rst +++ b/docs/gl_objects/pagesdomains.rst @@ -14,7 +14,7 @@ References + :class:`gitlab.v4.objects.ProjectPagesManager` + :attr:`gitlab.v4.objects.Project.pages` -* GitLab API: https://docs.gitlab.com/ee/api/pages.html +* GitLab API: https://docs.gitlab.com/api/pages Examples -------- @@ -43,7 +43,7 @@ References + :class:`gitlab.v4.objects.PagesDomainManager` + :attr:`gitlab.Gitlab.pagesdomains` -* GitLab API: https://docs.gitlab.com/ce/api/pages_domains.html#list-all-pages-domains +* GitLab API: https://docs.gitlab.com/api/pages_domains#list-all-pages-domains Examples -------- @@ -64,7 +64,7 @@ References + :class:`gitlab.v4.objects.ProjectPagesDomainManager` + :attr:`gitlab.v4.objects.Project.pagesdomains` -* GitLab API: https://docs.gitlab.com/ce/api/pages_domains.html#list-pages-domains +* GitLab API: https://docs.gitlab.com/api/pages_domains#list-pages-domains Examples -------- diff --git a/docs/gl_objects/personal_access_tokens.rst b/docs/gl_objects/personal_access_tokens.rst index ad6778175..410259cd4 100644 --- a/docs/gl_objects/personal_access_tokens.rst +++ b/docs/gl_objects/personal_access_tokens.rst @@ -16,8 +16,8 @@ References * GitLab API: - + https://docs.gitlab.com/ee/api/personal_access_tokens.html - + https://docs.gitlab.com/ee/api/users.html#create-a-personal-access-token + + https://docs.gitlab.com/api/personal_access_tokens + + https://docs.gitlab.com/api/users#create-a-personal-access-token Examples -------- diff --git a/docs/gl_objects/pipelines_and_jobs.rst b/docs/gl_objects/pipelines_and_jobs.rst index 9315142cf..8b533b407 100644 --- a/docs/gl_objects/pipelines_and_jobs.rst +++ b/docs/gl_objects/pipelines_and_jobs.rst @@ -16,7 +16,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPipelineManager` + :attr:`gitlab.v4.objects.Project.pipelines` -* GitLab API: https://docs.gitlab.com/ce/api/pipelines.html +* GitLab API: https://docs.gitlab.com/api/pipelines Examples -------- @@ -69,7 +69,7 @@ Reference + :class:`gitlab.v4.objects.ProjectTriggerManager` + :attr:`gitlab.v4.objects.Project.triggers` -* GitLab API: https://docs.gitlab.com/ce/api/pipeline_triggers.html +* GitLab API: https://docs.gitlab.com/api/pipeline_triggers Examples -------- @@ -115,7 +115,7 @@ objects to get the associated project:: project = gl.projects.get(project_id, lazy=True) # no API call project.trigger_pipeline('main', trigger_token) -Reference: https://docs.gitlab.com/ee/ci/triggers/#trigger-token +Reference: https://docs.gitlab.com/ci/triggers/#trigger-token Pipeline schedules ================== @@ -138,7 +138,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPipelineSchedulePipelineManager` + :attr:`gitlab.v4.objects.ProjectPipelineSchedule.pipelines` -* GitLab API: https://docs.gitlab.com/ce/api/pipeline_schedules.html +* GitLab API: https://docs.gitlab.com/api/pipeline_schedules Examples -------- @@ -216,7 +216,7 @@ Reference + :class:`gitlab.v4.objects.ProjectJobManager` + :attr:`gitlab.v4.objects.Project.jobs` -* GitLab API: https://docs.gitlab.com/ce/api/jobs.html +* GitLab API: https://docs.gitlab.com/api/jobs Examples -------- @@ -350,7 +350,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPipelineBridgeManager` + :attr:`gitlab.v4.objects.ProjectPipeline.bridges` -* GitLab API: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-bridges +* GitLab API: https://docs.gitlab.com/api/jobs#list-pipeline-bridges Examples -------- @@ -373,7 +373,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPipelineTestReportManager` + :attr:`gitlab.v4.objects.ProjectPipeline.test_report` -* GitLab API: https://docs.gitlab.com/ee/api/pipelines.html#get-a-pipelines-test-report +* GitLab API: https://docs.gitlab.com/api/pipelines#get-a-pipelines-test-report Examples -------- @@ -396,7 +396,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPipelineTestReportSummaryManager` + :attr:`gitlab.v4.objects.ProjectPipeline.test_report_summary` -* GitLab API: https://docs.gitlab.com/ee/api/pipelines.html#get-a-pipelines-test-report-summary +* GitLab API: https://docs.gitlab.com/api/pipelines#get-a-pipelines-test-report-summary Examples -------- diff --git a/docs/gl_objects/project_access_tokens.rst b/docs/gl_objects/project_access_tokens.rst index 8d89f886d..79412c5b5 100644 --- a/docs/gl_objects/project_access_tokens.rst +++ b/docs/gl_objects/project_access_tokens.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectAccessTokenManager` + :attr:`gitlab.Gitlab.project_access_tokens` -* GitLab API: https://docs.gitlab.com/ee/api/project_access_tokens.html +* GitLab API: https://docs.gitlab.com/api/project_access_tokens Examples -------- diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index 6bd09c26c..8305a6b0b 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectManager` + :attr:`gitlab.Gitlab.projects` -* GitLab API: https://docs.gitlab.com/ce/api/projects.html +* GitLab API: https://docs.gitlab.com/api/projects Examples -------- @@ -195,7 +195,7 @@ Get the repository archive:: .. note:: For the formats available, refer to - https://docs.gitlab.com/ce/api/repositories.html#get-file-archive + https://docs.gitlab.com/api/repositories#get-file-archive .. warning:: @@ -270,7 +270,7 @@ Reference + :attr:`gitlab.v4.objects.Project.imports` + :attr:`gitlab.v4.objects.ProjectManager.import_project` -* GitLab API: https://docs.gitlab.com/ce/api/project_import_export.html +* GitLab API: https://docs.gitlab.com/api/project_import_export .. _project_import_export: @@ -381,7 +381,7 @@ Reference + :class:`gitlab.v4.objects.ProjectCustomAttributeManager` + :attr:`gitlab.v4.objects.Project.customattributes` -* GitLab API: https://docs.gitlab.com/ce/api/custom_attributes.html +* GitLab API: https://docs.gitlab.com/api/custom_attributes Examples -------- @@ -421,7 +421,7 @@ Reference + :class:`gitlab.v4.objects.ProjectFileManager` + :attr:`gitlab.v4.objects.Project.files` -* GitLab API: https://docs.gitlab.com/ce/api/repository_files.html +* GitLab API: https://docs.gitlab.com/api/repository_files Examples -------- @@ -442,7 +442,7 @@ Get file details from headers, without fetching its entire content:: # Get the file size: # For a full list of headers returned, see upstream documentation. - # https://docs.gitlab.com/ee/api/repository_files.html#get-file-from-repository + # https://docs.gitlab.com/api/repository_files#get-file-from-repository print(headers["X-Gitlab-Size"]) Get a raw file:: @@ -495,7 +495,7 @@ Reference + :class:`gitlab.v4.objects.ProjectTagManager` + :attr:`gitlab.v4.objects.Project.tags` -* GitLab API: https://docs.gitlab.com/ce/api/tags.html +* GitLab API: https://docs.gitlab.com/api/tags Examples -------- @@ -538,7 +538,7 @@ Reference + :class:`gitlab.v4.objects.ProjectSnippetManager` + :attr:`gitlab.v4.objects.Project.files` -* GitLab API: https://docs.gitlab.com/ce/api/project_snippets.html +* GitLab API: https://docs.gitlab.com/api/project_snippets Examples -------- @@ -604,7 +604,7 @@ Reference + :attr:`gitlab.v4.objects.Project.members` + :attr:`gitlab.v4.objects.Project.members_all` -* GitLab API: https://docs.gitlab.com/ce/api/members.html +* GitLab API: https://docs.gitlab.com/api/members Examples -------- @@ -664,7 +664,7 @@ Reference + :class:`gitlab.v4.objects.ProjectHookManager` + :attr:`gitlab.v4.objects.Project.hooks` -* GitLab API: https://docs.gitlab.com/ce/api/projects.html#hooks +* GitLab API: https://docs.gitlab.com/api/projects#hooks Examples -------- @@ -708,7 +708,7 @@ Reference + :class:`gitlab.v4.objects.ProjectIntegrationManager` + :attr:`gitlab.v4.objects.Project.integrations` -* GitLab API: https://docs.gitlab.com/ce/api/integrations.html +* GitLab API: https://docs.gitlab.com/api/integrations Examples --------- @@ -757,7 +757,7 @@ Reference + :attr:`gitlab.v4.objects.Project.upload` -* Gitlab API: https://docs.gitlab.com/ce/api/projects.html#upload-a-file +* Gitlab API: https://docs.gitlab.com/api/projects#upload-a-file Examples -------- @@ -800,7 +800,7 @@ Reference + :class:`gitlab.v4.objects.ProjectPushRulesManager` + :attr:`gitlab.v4.objects.Project.pushrules` -* GitLab API: https://docs.gitlab.com/ee/api/projects.html#push-rules +* GitLab API: https://docs.gitlab.com/api/projects#push-rules Examples --------- @@ -834,7 +834,7 @@ Reference + :class:`gitlab.v4.objects.ProjectProtectedTagManager` + :attr:`gitlab.v4.objects.Project.protectedtags` -* GitLab API: https://docs.gitlab.com/ce/api/protected_tags.html +* GitLab API: https://docs.gitlab.com/api/protected_tags Examples --------- @@ -867,7 +867,7 @@ Reference + :class:`gitlab.v4.objects.ProjectAdditionalStatisticsManager` + :attr:`gitlab.v4.objects.Project.additionalstatistics` -* GitLab API: https://docs.gitlab.com/ce/api/project_statistics.html +* GitLab API: https://docs.gitlab.com/api/project_statistics Examples --------- @@ -894,7 +894,7 @@ Reference + :class:`gitlab.v4.objects.ProjectStorageManager` + :attr:`gitlab.v4.objects.Project.storage` -* GitLab API: https://docs.gitlab.com/ee/api/projects.html#get-the-path-to-repository-storage +* GitLab API: https://docs.gitlab.com/api/projects#get-the-path-to-repository-storage Examples --------- diff --git a/docs/gl_objects/protected_branches.rst b/docs/gl_objects/protected_branches.rst index 2a8ccf7d9..ce5e300db 100644 --- a/docs/gl_objects/protected_branches.rst +++ b/docs/gl_objects/protected_branches.rst @@ -14,7 +14,7 @@ References + :class:`gitlab.v4.objects.ProjectProtectedBranchManager` + :attr:`gitlab.v4.objects.Project.protectedbranches` -* GitLab API: https://docs.gitlab.com/ce/api/protected_branches.html#protected-branches-api +* GitLab API: https://docs.gitlab.com/api/protected_branches#protected-branches-api Examples -------- diff --git a/docs/gl_objects/protected_container_repositories.rst b/docs/gl_objects/protected_container_repositories.rst index ea0d24511..bc37c6138 100644 --- a/docs/gl_objects/protected_container_repositories.rst +++ b/docs/gl_objects/protected_container_repositories.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectRegistryRepositoryProtectionRuleRuleManager` + :attr:`gitlab.v4.objects.Project.registry_protection_repository_rules` -* GitLab API: https://docs.gitlab.com/ee/api/container_repository_protection_rules.html +* GitLab API: https://docs.gitlab.com/api/container_repository_protection_rules Examples -------- diff --git a/docs/gl_objects/protected_environments.rst b/docs/gl_objects/protected_environments.rst index 1a81a5de8..e36c1fad0 100644 --- a/docs/gl_objects/protected_environments.rst +++ b/docs/gl_objects/protected_environments.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectProtectedEnvironmentManager` + :attr:`gitlab.v4.objects.Project.protected_environment` -* GitLab API: https://docs.gitlab.com/ee/api/protected_environments.html +* GitLab API: https://docs.gitlab.com/api/protected_environments Examples -------- diff --git a/docs/gl_objects/protected_packages.rst b/docs/gl_objects/protected_packages.rst index 108a91fd9..6865b6992 100644 --- a/docs/gl_objects/protected_packages.rst +++ b/docs/gl_objects/protected_packages.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectPackageProtectionRuleManager` + :attr:`gitlab.v4.objects.Project.package_protection_rules` -* GitLab API: https://docs.gitlab.com/ee/api/project_packages_protection_rules.html +* GitLab API: https://docs.gitlab.com/api/project_packages_protection_rules Examples -------- diff --git a/docs/gl_objects/pull_mirror.rst b/docs/gl_objects/pull_mirror.rst index e62cd6a4e..bc83ba36d 100644 --- a/docs/gl_objects/pull_mirror.rst +++ b/docs/gl_objects/pull_mirror.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectPullMirrorManager` + :attr:`gitlab.v4.objects.Project.pull_mirror` -* GitLab API: https://docs.gitlab.com/ce/api/pull_mirror.html +* GitLab API: https://docs.gitlab.com/api/project_pull_mirroring/ Examples -------- diff --git a/docs/gl_objects/releases.rst b/docs/gl_objects/releases.rst index 662966067..99be7ce9f 100644 --- a/docs/gl_objects/releases.rst +++ b/docs/gl_objects/releases.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectReleaseManager` + :attr:`gitlab.v4.objects.Project.releases` -* Gitlab API: https://docs.gitlab.com/ee/api/releases/index.html +* Gitlab API: https://docs.gitlab.com/api/releases/index Examples -------- @@ -66,7 +66,7 @@ Reference + :class:`gitlab.v4.objects.ProjectReleaseLinkManager` + :attr:`gitlab.v4.objects.ProjectRelease.links` -* Gitlab API: https://docs.gitlab.com/ee/api/releases/links.html +* Gitlab API: https://docs.gitlab.com/api/releases/links Examples -------- diff --git a/docs/gl_objects/remote_mirrors.rst b/docs/gl_objects/remote_mirrors.rst index 505131aed..b4610117d 100644 --- a/docs/gl_objects/remote_mirrors.rst +++ b/docs/gl_objects/remote_mirrors.rst @@ -13,7 +13,7 @@ References + :class:`gitlab.v4.objects.ProjectRemoteMirrorManager` + :attr:`gitlab.v4.objects.Project.remote_mirrors` -* GitLab API: https://docs.gitlab.com/ce/api/remote_mirrors.html +* GitLab API: https://docs.gitlab.com/api/remote_mirrors Examples -------- diff --git a/docs/gl_objects/repositories.rst b/docs/gl_objects/repositories.rst index 6541228b4..b0c049bd2 100644 --- a/docs/gl_objects/repositories.rst +++ b/docs/gl_objects/repositories.rst @@ -11,7 +11,7 @@ References + :class:`gitlab.v4.objects.ProjectRegistryRepositoryManager` + :attr:`gitlab.v4.objects.Project.repositories` -* Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html +* Gitlab API: https://docs.gitlab.com/api/container_registry Examples -------- diff --git a/docs/gl_objects/repository_tags.rst b/docs/gl_objects/repository_tags.rst index 8e71eeb91..a8e4be33f 100644 --- a/docs/gl_objects/repository_tags.rst +++ b/docs/gl_objects/repository_tags.rst @@ -11,7 +11,7 @@ References + :class:`gitlab.v4.objects.ProjectRegistryTagManager` + :attr:`gitlab.v4.objects.Repository.tags` -* Gitlab API: https://docs.gitlab.com/ce/api/container_registry.html +* Gitlab API: https://docs.gitlab.com/api/container_registry Examples -------- @@ -44,4 +44,4 @@ Delete tag in bulk:: .. note:: Delete in bulk is asynchronous operation and may take a while. - Refer to: https://docs.gitlab.com/ce/api/container_registry.html#delete-repository-tags-in-bulk + Refer to: https://docs.gitlab.com/api/container_registry#delete-repository-tags-in-bulk diff --git a/docs/gl_objects/resource_groups.rst b/docs/gl_objects/resource_groups.rst index 89d8998ac..4b1a9693f 100644 --- a/docs/gl_objects/resource_groups.rst +++ b/docs/gl_objects/resource_groups.rst @@ -14,7 +14,7 @@ Reference + :class:`gitlab.v4.objects.ProjectResourceGroupUpcomingJobManager` + :attr:`gitlab.v4.objects.ProjectResourceGroup.upcoming_jobs` -* Gitlab API: https://docs.gitlab.com/ee/api/resource_groups.html +* Gitlab API: https://docs.gitlab.com/api/resource_groups Examples -------- diff --git a/docs/gl_objects/runners.rst b/docs/gl_objects/runners.rst index eda71e557..4d0686a4c 100644 --- a/docs/gl_objects/runners.rst +++ b/docs/gl_objects/runners.rst @@ -23,7 +23,7 @@ Reference + :class:`gitlab.v4.objects.RunnerAllManager` + :attr:`gitlab.Gitlab.runners_all` -* GitLab API: https://docs.gitlab.com/ce/api/runners.html +* GitLab API: https://docs.gitlab.com/api/runners Examples -------- @@ -119,7 +119,7 @@ Reference + :class:`gitlab.v4.objects.GroupRunnerManager` + :attr:`gitlab.v4.objects.Group.runners` -* GitLab API: https://docs.gitlab.com/ce/api/runners.html +* GitLab API: https://docs.gitlab.com/api/runners Examples -------- @@ -148,7 +148,7 @@ Reference + :class:`gitlab.v4.objects.RunnerJobManager` + :attr:`gitlab.v4.objects.Runner.jobs` -* GitLab API: https://docs.gitlab.com/ce/api/runners.html +* GitLab API: https://docs.gitlab.com/api/runners Examples -------- diff --git a/docs/gl_objects/search.rst b/docs/gl_objects/search.rst index 2720dc445..78ec83785 100644 --- a/docs/gl_objects/search.rst +++ b/docs/gl_objects/search.rst @@ -38,7 +38,7 @@ Reference + :attr:`gitlab.v4.objects.Group.search` + :attr:`gitlab.v4.objects.Project.search` -* GitLab API: https://docs.gitlab.com/ce/api/search.html +* GitLab API: https://docs.gitlab.com/api/search Examples -------- diff --git a/docs/gl_objects/secure_files.rst b/docs/gl_objects/secure_files.rst index 56f525a18..62d6c4b12 100644 --- a/docs/gl_objects/secure_files.rst +++ b/docs/gl_objects/secure_files.rst @@ -14,7 +14,7 @@ References + :class:`gitlab.v4.objects.ProjectSecureFileManager` + :attr:`gitlab.v4.objects.Project.secure_files` -* GitLab API: https://docs.gitlab.com/ee/api/secure_files.html +* GitLab API: https://docs.gitlab.com/api/secure_files Examples -------- diff --git a/docs/gl_objects/settings.rst b/docs/gl_objects/settings.rst index 4accfe0f0..a0ab7f012 100644 --- a/docs/gl_objects/settings.rst +++ b/docs/gl_objects/settings.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ApplicationSettingsManager` + :attr:`gitlab.Gitlab.settings` -* GitLab API: https://docs.gitlab.com/ce/api/settings.html +* GitLab API: https://docs.gitlab.com/api/settings Examples -------- diff --git a/docs/gl_objects/sidekiq.rst b/docs/gl_objects/sidekiq.rst index 5f44762e2..870de8745 100644 --- a/docs/gl_objects/sidekiq.rst +++ b/docs/gl_objects/sidekiq.rst @@ -10,7 +10,7 @@ Reference + :class:`gitlab.v4.objects.SidekiqManager` + :attr:`gitlab.Gitlab.sidekiq` -* GitLab API: https://docs.gitlab.com/ce/api/sidekiq_metrics.html +* GitLab API: https://docs.gitlab.com/api/sidekiq_metrics Examples -------- diff --git a/docs/gl_objects/snippets.rst b/docs/gl_objects/snippets.rst index 63cfd4feb..3633ec142 100644 --- a/docs/gl_objects/snippets.rst +++ b/docs/gl_objects/snippets.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.SnipptManager` + :attr:`gitlab.Gitlab.snippets` -* GitLab API: https://docs.gitlab.com/ce/api/snippets.html +* GitLab API: https://docs.gitlab.com/api/snippets Examples ======== diff --git a/docs/gl_objects/statistics.rst b/docs/gl_objects/statistics.rst index d1d72eb9e..fd49372bb 100644 --- a/docs/gl_objects/statistics.rst +++ b/docs/gl_objects/statistics.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.ApplicationStatisticsManager` + :attr:`gitlab.Gitlab.statistics` -* GitLab API: https://docs.gitlab.com/ee/api/statistics.html +* GitLab API: https://docs.gitlab.com/api/statistics Examples -------- diff --git a/docs/gl_objects/status_checks.rst b/docs/gl_objects/status_checks.rst index 9ac90db85..062231216 100644 --- a/docs/gl_objects/status_checks.rst +++ b/docs/gl_objects/status_checks.rst @@ -17,7 +17,7 @@ Reference + :class:`gitlab.v4.objects.ProjectExternalStatusCheckManager` + :attr:`gitlab.v4.objects.Project.external_status_checks` -* GitLab API: https://docs.gitlab.com/ee/api/status_checks.html +* GitLab API: https://docs.gitlab.com/api/status_checks Examples --------- diff --git a/docs/gl_objects/system_hooks.rst b/docs/gl_objects/system_hooks.rst index 088338004..7acba56a3 100644 --- a/docs/gl_objects/system_hooks.rst +++ b/docs/gl_objects/system_hooks.rst @@ -11,7 +11,7 @@ Reference + :class:`gitlab.v4.objects.HookManager` + :attr:`gitlab.Gitlab.hooks` -* GitLab API: https://docs.gitlab.com/ce/api/system_hooks.html +* GitLab API: https://docs.gitlab.com/api/system_hooks Examples -------- diff --git a/docs/gl_objects/templates.rst b/docs/gl_objects/templates.rst index b4a731b4b..6a03a7d1a 100644 --- a/docs/gl_objects/templates.rst +++ b/docs/gl_objects/templates.rst @@ -21,7 +21,7 @@ Reference + :class:`gitlab.v4.objects.LicenseManager` + :attr:`gitlab.Gitlab.licenses` -* GitLab API: https://docs.gitlab.com/ce/api/templates/licenses.html +* GitLab API: https://docs.gitlab.com/api/templates/licenses Examples -------- @@ -47,7 +47,7 @@ Reference + :class:`gitlab.v4.objects.GitignoreManager` + :attr:`gitlab.Gitlab.gitignores` -* GitLab API: https://docs.gitlab.com/ce/api/templates/gitignores.html +* GitLab API: https://docs.gitlab.com/api/templates/gitignores Examples -------- @@ -73,7 +73,7 @@ Reference + :class:`gitlab.v4.objects.GitlabciymlManager` + :attr:`gitlab.Gitlab.gitlabciymls` -* GitLab API: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html +* GitLab API: https://docs.gitlab.com/api/templates/gitlab_ci_ymls Examples -------- @@ -99,7 +99,7 @@ Reference + :class:`gitlab.v4.objects.DockerfileManager` + :attr:`gitlab.Gitlab.gitlabciymls` -* GitLab API: https://docs.gitlab.com/ce/api/templates/dockerfiles.html +* GitLab API: https://docs.gitlab.com/api/templates/dockerfiles Examples -------- @@ -143,7 +143,7 @@ Reference + :class:`gitlab.v4.objects.ProjectMergeRequestTemplateManager` + :attr:`gitlab.v4.objects.Project.merge_request_templates` -* GitLab API: https://docs.gitlab.com/ce/api/project_templates.html +* GitLab API: https://docs.gitlab.com/api/project_templates Examples -------- diff --git a/docs/gl_objects/todos.rst b/docs/gl_objects/todos.rst index 88c80030b..821c60636 100644 --- a/docs/gl_objects/todos.rst +++ b/docs/gl_objects/todos.rst @@ -11,7 +11,7 @@ Reference + :class:`~gitlab.objects.TodoManager` + :attr:`gitlab.Gitlab.todos` -* GitLab API: https://docs.gitlab.com/ce/api/todos.html +* GitLab API: https://docs.gitlab.com/api/todos Examples -------- diff --git a/docs/gl_objects/topics.rst b/docs/gl_objects/topics.rst index 7b1a7991a..35e12d838 100644 --- a/docs/gl_objects/topics.rst +++ b/docs/gl_objects/topics.rst @@ -13,7 +13,7 @@ Reference + :class:`gitlab.v4.objects.TopicManager` + :attr:`gitlab.Gitlab.topics` -* GitLab API: https://docs.gitlab.com/ce/api/topics.html +* GitLab API: https://docs.gitlab.com/api/topics This endpoint requires admin access for creating, updating and deleting objects. diff --git a/docs/gl_objects/users.rst b/docs/gl_objects/users.rst index e855fd29c..185167f92 100644 --- a/docs/gl_objects/users.rst +++ b/docs/gl_objects/users.rst @@ -23,8 +23,8 @@ References * GitLab API: - + https://docs.gitlab.com/ee/api/users.html - + https://docs.gitlab.com/ee/api/projects.html#list-projects-starred-by-a-user + + https://docs.gitlab.com/api/users + + https://docs.gitlab.com/api/projects#list-projects-starred-by-a-user Examples -------- @@ -130,7 +130,7 @@ References + :class:`gitlab.v4.objects.UserCustomAttributeManager` + :attr:`gitlab.v4.objects.User.customattributes` -* GitLab API: https://docs.gitlab.com/ce/api/custom_attributes.html +* GitLab API: https://docs.gitlab.com/api/custom_attributes Examples -------- @@ -170,7 +170,7 @@ References + :class:`gitlab.v4.objects.UserImpersonationTokenManager` + :attr:`gitlab.v4.objects.User.impersonationtokens` -* GitLab API: https://docs.gitlab.com/ee/api/user_tokens.html#get-all-impersonation-tokens-of-a-user +* GitLab API: https://docs.gitlab.com/api/user_tokens#get-all-impersonation-tokens-of-a-user List impersonation tokens for a user:: @@ -204,7 +204,7 @@ References + :class:`gitlab.v4.objects.UserProjectManager` + :attr:`gitlab.v4.objects.User.projects` -* GitLab API: https://docs.gitlab.com/ee/api/projects.html#list-a-users-projects +* GitLab API: https://docs.gitlab.com/api/projects#list-a-users-projects List visible projects in the user's namespace:: @@ -229,7 +229,7 @@ References + :class:`gitlab.v4.objects.UserMembershipManager` + :attr:`gitlab.v4.objects.User.memberships` -* GitLab API: https://docs.gitlab.com/ee/api/users.html#list-projects-and-groups-that-a-user-is-a-member-of +* GitLab API: https://docs.gitlab.com/api/users#list-projects-and-groups-that-a-user-is-a-member-of List direct memberships for a user:: @@ -259,7 +259,7 @@ References + :class:`gitlab.v4.objects.CurrentUserManager` + :attr:`gitlab.Gitlab.user` -* GitLab API: https://docs.gitlab.com/ee/api/users.html +* GitLab API: https://docs.gitlab.com/api/users Examples -------- @@ -287,7 +287,7 @@ are admin. + :class:`gitlab.v4.objects.UserGPGKeyManager` + :attr:`gitlab.v4.objects.User.gpgkeys` -* GitLab API: https://docs.gitlab.com/ee/api/user_keys.html#list-your-gpg-keys +* GitLab API: https://docs.gitlab.com/api/user_keys#list-your-gpg-keys Examples -------- @@ -329,7 +329,7 @@ are admin. + :class:`gitlab.v4.objects.UserKeyManager` + :attr:`gitlab.v4.objects.User.keys` -* GitLab API: https://docs.gitlab.com/ee/api/user_keys.html#get-a-single-ssh-key +* GitLab API: https://docs.gitlab.com/api/user_keys#get-a-single-ssh-key Examples -------- @@ -370,7 +370,7 @@ You can manipulate the status for the current user and you can read the status o + :class:`gitlab.v4.objects.UserStatusManager` + :attr:`gitlab.v4.objects.User.status` -* GitLab API: https://docs.gitlab.com/ee/api/users.html#get-the-status-of-a-user +* GitLab API: https://docs.gitlab.com/api/users#get-the-status-of-a-user Examples -------- @@ -408,7 +408,7 @@ are admin. + :class:`gitlab.v4.objects.UserEmailManager` + :attr:`gitlab.v4.objects.User.emails` -* GitLab API: https://docs.gitlab.com/ee/api/user_email_addresses.html +* GitLab API: https://docs.gitlab.com/api/user_email_addresses Examples -------- @@ -445,7 +445,7 @@ References + :class:`gitlab.v4.objects.UserActivitiesManager` + :attr:`gitlab.Gitlab.user_activities` -* GitLab API: https://docs.gitlab.com/ee/api/users.html#list-a-users-activity +* GitLab API: https://docs.gitlab.com/api/users#list-a-users-activity Examples -------- @@ -463,7 +463,7 @@ Create new runner References ---------- -* New runner registration API endpoint (see `Migrating to the new runner registration workflow `_) +* New runner registration API endpoint (see `Migrating to the new runner registration workflow `_) * v4 API: @@ -471,7 +471,7 @@ References + :class:`gitlab.v4.objects.CurrentUserRunnerManager` + :attr:`gitlab.Gitlab.user.runners` -* GitLab API : https://docs.gitlab.com/ee/api/users.html#create-a-runner-linked-to-a-user +* GitLab API : https://docs.gitlab.com/api/users#create-a-runner-linked-to-a-user Examples -------- diff --git a/docs/gl_objects/variables.rst b/docs/gl_objects/variables.rst index ef28a8bea..4fd3255a2 100644 --- a/docs/gl_objects/variables.rst +++ b/docs/gl_objects/variables.rst @@ -10,7 +10,7 @@ variables to projects and groups, to modify pipeline/job scripts behavior. Please always follow GitLab's `rules for CI/CD variables`_, especially for values in masked variables. If you do not, your variables may silently fail to save. -.. _rules for CI/CD variables: https://docs.gitlab.com/ee/ci/variables/#add-a-cicd-variable-to-a-project +.. _rules for CI/CD variables: https://docs.gitlab.com/ci/variables/#add-a-cicd-variable-to-a-project Instance-level variables ======================== @@ -28,7 +28,7 @@ Reference * GitLab API - + https://docs.gitlab.com/ce/api/instance_level_ci_variables.html + + https://docs.gitlab.com/api/instance_level_ci_variables Examples -------- @@ -73,9 +73,9 @@ Reference * GitLab API - + https://docs.gitlab.com/ce/api/instance_level_ci_variables.html - + https://docs.gitlab.com/ce/api/project_level_variables.html - + https://docs.gitlab.com/ce/api/group_level_variables.html + + https://docs.gitlab.com/api/instance_level_ci_variables + + https://docs.gitlab.com/api/project_level_variables + + https://docs.gitlab.com/api/group_level_variables Examples -------- diff --git a/docs/gl_objects/wikis.rst b/docs/gl_objects/wikis.rst index 955132b24..d9b747eb5 100644 --- a/docs/gl_objects/wikis.rst +++ b/docs/gl_objects/wikis.rst @@ -15,8 +15,8 @@ References + :class:`gitlab.v4.objects.GroupWikiManager` + :attr:`gitlab.v4.objects.Group.wikis` -* GitLab API for Projects: https://docs.gitlab.com/ce/api/wikis.html -* GitLab API for Groups: https://docs.gitlab.com/ee/api/group_wikis.html +* GitLab API for Projects: https://docs.gitlab.com/api/wikis +* GitLab API for Groups: https://docs.gitlab.com/api/group_wikis Examples -------- @@ -68,8 +68,8 @@ Reference + :attr:`gitlab.v4.objects.GrouptWiki.upload` -* Gitlab API for Projects: https://docs.gitlab.com/ee/api/wikis.html#upload-an-attachment-to-the-wiki-repository -* Gitlab API for Groups: https://docs.gitlab.com/ee/api/group_wikis.html#upload-an-attachment-to-the-wiki-repository +* Gitlab API for Projects: https://docs.gitlab.com/api/wikis#upload-an-attachment-to-the-wiki-repository +* Gitlab API for Groups: https://docs.gitlab.com/api/group_wikis#upload-an-attachment-to-the-wiki-repository Examples -------- From 8c8fd84fde43c1df2b671bdcd70f816713b24c16 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 02:19:51 +0000 Subject: [PATCH 010/102] chore(deps): update gitlab/gitlab-runner docker tag to v96856197 (#3190) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tests/functional/fixtures/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/fixtures/.env b/tests/functional/fixtures/.env index e3723b892..e85f85e6f 100644 --- a/tests/functional/fixtures/.env +++ b/tests/functional/fixtures/.env @@ -1,4 +1,4 @@ GITLAB_IMAGE=gitlab/gitlab-ee GITLAB_TAG=17.8.2-ee.0 GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner -GITLAB_RUNNER_TAG=92594782 +GITLAB_RUNNER_TAG=96856197 From ee6cba13fa9e75a27dd9f4a17db4b342f95ddab9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 06:48:14 +0000 Subject: [PATCH 011/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 890b562b0..b679bb4d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v9.21.0 + uses: python-semantic-release/python-semantic-release@v9.21.1 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06e947d71..362293588 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.6.1 + rev: v4.7.0 hooks: - id: commitizen stages: [commit-msg] diff --git a/requirements-lint.txt b/requirements-lint.txt index cec0bf3c2..ae1d21d5d 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,7 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.6.1 +commitizen==4.7.0 flake8==7.2.0 isort==6.0.1 mypy==1.15.0 @@ -11,4 +11,4 @@ responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250402 types-requests==2.32.0.20250328 -types-setuptools==80.3.0.20250505 +types-setuptools==80.4.0.20250511 From a9163a9775b3f9a7b729048fab83bb0bca7228b5 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Mon, 12 May 2025 23:48:30 +0200 Subject: [PATCH 012/102] feat(settings): implement support for 'silent_mode_enabled' Signed-off-by: Adrian DC --- gitlab/v4/objects/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gitlab/v4/objects/settings.py b/gitlab/v4/objects/settings.py index 41d820647..fd8629b36 100644 --- a/gitlab/v4/objects/settings.py +++ b/gitlab/v4/objects/settings.py @@ -25,6 +25,7 @@ class ApplicationSettingsManager( "id", "default_projects_limit", "signup_enabled", + "silent_mode_enabled", "password_authentication_enabled_for_web", "gravatar_enabled", "sign_in_text", From 203bd92e524845a3e1287439d78c167133347a69 Mon Sep 17 00:00:00 2001 From: Manu Date: Tue, 13 May 2025 17:58:13 +0200 Subject: [PATCH 013/102] docs(job_token_scope): fix typo/inconsistency --- docs/gl_objects/job_token_scope.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/gl_objects/job_token_scope.rst b/docs/gl_objects/job_token_scope.rst index 0d7771d9f..8857e2251 100644 --- a/docs/gl_objects/job_token_scope.rst +++ b/docs/gl_objects/job_token_scope.rst @@ -82,13 +82,13 @@ Get a project's CI/CD job token inbound groups allowlist:: allowlist = scope.groups_allowlist.list(get_all=True) -Add a project to the project's inbound groups allowlist:: +Add a group to the project's inbound groups allowlist:: - allowed_project = scope.groups_allowlist.create({"target_project_id": 42}) + allowed_group = scope.groups_allowlist.create({"target_group_id": 42}) -Remove a project from the project's inbound agroups llowlist:: +Remove a group from the project's inbound groups allowlist:: - allowed_project.delete() + allowed_group.delete() # or directly using a Group ID scope.groups_allowlist.delete(42) @@ -97,4 +97,3 @@ Remove a project from the project's inbound agroups llowlist:: Similar to above, the ID attributes you receive from the create and list APIs are not consistent. To safely retrieve the ID of the allowlisted group regardless of how the object was created, always use its ``.get_id()`` method. - From 938b0d9c188bcffc6759184325bf292131307556 Mon Sep 17 00:00:00 2001 From: Massimiliano Riva <48362794+massimiliano96@users.noreply.github.com> Date: Wed, 14 May 2025 15:07:11 +0200 Subject: [PATCH 014/102] feat(api): add iteration_id as boards create attribute (#3191) --- gitlab/v4/objects/boards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab/v4/objects/boards.py b/gitlab/v4/objects/boards.py index 861b09046..1683a5fe1 100644 --- a/gitlab/v4/objects/boards.py +++ b/gitlab/v4/objects/boards.py @@ -23,7 +23,7 @@ class GroupBoardListManager(CRUDMixin[GroupBoardList]): _obj_cls = GroupBoardList _from_parent_attrs = {"group_id": "group_id", "board_id": "id"} _create_attrs = RequiredOptional( - exclusive=("label_id", "assignee_id", "milestone_id") + exclusive=("label_id", "assignee_id", "milestone_id", "iteration_id") ) _update_attrs = RequiredOptional(required=("position",)) @@ -48,7 +48,7 @@ class ProjectBoardListManager(CRUDMixin[ProjectBoardList]): _obj_cls = ProjectBoardList _from_parent_attrs = {"project_id": "project_id", "board_id": "id"} _create_attrs = RequiredOptional( - exclusive=("label_id", "assignee_id", "milestone_id") + exclusive=("label_id", "assignee_id", "milestone_id", "iteration_id") ) _update_attrs = RequiredOptional(required=("position",)) From da40e09498277467878b810aa44f86b48813d832 Mon Sep 17 00:00:00 2001 From: Massimiliano Riva Date: Wed, 14 May 2025 16:56:00 +0200 Subject: [PATCH 015/102] feat(api): add support for token self-rotation --- docs/gl_objects/group_access_tokens.rst | 6 +++++ docs/gl_objects/personal_access_tokens.rst | 6 +++++ docs/gl_objects/project_access_tokens.rst | 6 +++++ gitlab/mixins.py | 6 +++-- .../unit/objects/test_group_access_tokens.py | 25 +++++++++++++++++ .../objects/test_personal_access_tokens.py | 27 ++++++++++++++++++- .../objects/test_project_access_tokens.py | 27 +++++++++++++++++++ 7 files changed, 100 insertions(+), 3 deletions(-) diff --git a/docs/gl_objects/group_access_tokens.rst b/docs/gl_objects/group_access_tokens.rst index 60519e2ab..26c694e5b 100644 --- a/docs/gl_objects/group_access_tokens.rst +++ b/docs/gl_objects/group_access_tokens.rst @@ -46,3 +46,9 @@ Rotate a group access token and retrieve its new value:: # or directly using a token ID new_token = group.access_tokens.rotate(42) print(new_token.token) + +Self-Rotate the group access token you are using to authenticate the request and retrieve its new value:: + + token = group.access_tokens.get(42, lazy=True) + token.rotate(self_rotate=True) + print(token.token) \ No newline at end of file diff --git a/docs/gl_objects/personal_access_tokens.rst b/docs/gl_objects/personal_access_tokens.rst index 410259cd4..d9d54b596 100644 --- a/docs/gl_objects/personal_access_tokens.rst +++ b/docs/gl_objects/personal_access_tokens.rst @@ -61,6 +61,12 @@ Rotate a personal access token and retrieve its new value:: new_token_dict = gl.personal_access_tokens.rotate(42) print(new_token_dict) +Self-Rotate the personal access token you are using to authenticate the request and retrieve its new value:: + + token = gl.personal_access_tokens.get(42, lazy=True) + token.rotate(self_rotate=True) + print(token.token) + Create a personal access token for a user (admin only):: user = gl.users.get(25, lazy=True) diff --git a/docs/gl_objects/project_access_tokens.rst b/docs/gl_objects/project_access_tokens.rst index 79412c5b5..6088e4d55 100644 --- a/docs/gl_objects/project_access_tokens.rst +++ b/docs/gl_objects/project_access_tokens.rst @@ -46,3 +46,9 @@ Rotate a project access token and retrieve its new value:: # or directly using a token ID new_token = project.access_tokens.rotate(42) print(new_token.token) + +Self-Rotate the project access token you are using to authenticate the request and retrieve its new value:: + + token = project.access_tokens.get(42, lazy=True) + token.rotate(self_rotate=True) + print(new_token.token) \ No newline at end of file diff --git a/gitlab/mixins.py b/gitlab/mixins.py index ff99abdf6..51de97876 100644 --- a/gitlab/mixins.py +++ b/gitlab/mixins.py @@ -660,10 +660,11 @@ class ObjectRotateMixin(_RestObjectBase): optional=("expires_at",), ) @exc.on_http_error(exc.GitlabRotateError) - def rotate(self, **kwargs: Any) -> dict[str, Any]: + def rotate(self, *, self_rotate: bool = False, **kwargs: Any) -> dict[str, Any]: """Rotate the current access token object. Args: + self_rotate: If True, the current access token object will be rotated. **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -673,7 +674,8 @@ def rotate(self, **kwargs: Any) -> dict[str, Any]: if TYPE_CHECKING: assert isinstance(self.manager, RotateMixin) assert self.encoded_id is not None - server_data = self.manager.rotate(self.encoded_id, **kwargs) + token_id = "self" if self_rotate else self.encoded_id + server_data = self.manager.rotate(token_id, **kwargs) self._update_attrs(server_data) return server_data diff --git a/tests/unit/objects/test_group_access_tokens.py b/tests/unit/objects/test_group_access_tokens.py index 53b636284..c09ed8e12 100644 --- a/tests/unit/objects/test_group_access_tokens.py +++ b/tests/unit/objects/test_group_access_tokens.py @@ -91,6 +91,19 @@ def resp_rotate_group_access_token(token_content): yield rsps +@pytest.fixture +def resp_self_rotate_group_access_token(token_content): + with responses.RequestsMock() as rsps: + rsps.add( + method=responses.POST, + url="http://localhost/api/v4/groups/1/access_tokens/self/rotate", + json=token_content, + content_type="application/json", + status=200, + ) + yield rsps + + def test_list_group_access_tokens(gl, resp_list_group_access_token): access_tokens = gl.groups.get(1, lazy=True).access_tokens.list() assert len(access_tokens) == 1 @@ -127,3 +140,15 @@ def test_rotate_group_access_token(group, resp_rotate_group_access_token): access_token.rotate() assert isinstance(access_token, GroupAccessToken) assert access_token.token == "s3cr3t" + + +def test_self_rotate_group_access_token(group, resp_self_rotate_group_access_token): + access_token = group.access_tokens.get(1, lazy=True) + access_token.rotate(self_rotate=True) + assert isinstance(access_token, GroupAccessToken) + assert access_token.token == "s3cr3t" + + # Verify that the url contains "self" + rotation_calls = resp_self_rotate_group_access_token.calls + assert len(rotation_calls) == 1 + assert "self/rotate" in rotation_calls[0].request.url diff --git a/tests/unit/objects/test_personal_access_tokens.py b/tests/unit/objects/test_personal_access_tokens.py index 1301f5ffb..6272cecc1 100644 --- a/tests/unit/objects/test_personal_access_tokens.py +++ b/tests/unit/objects/test_personal_access_tokens.py @@ -102,6 +102,19 @@ def resp_rotate_personal_access_token(token_content): yield rsps +@pytest.fixture +def resp_self_rotate_personal_access_token(token_content): + with responses.RequestsMock() as rsps: + rsps.add( + method=responses.POST, + url="http://localhost/api/v4/personal_access_tokens/self/rotate", + json=token_content, + content_type="application/json", + status=200, + ) + yield rsps + + def test_create_personal_access_token(gl, resp_create_user_personal_access_token): user = gl.users.get(1, lazy=True) access_token = user.personal_access_tokens.create( @@ -148,8 +161,20 @@ def test_revoke_personal_access_token_by_id(gl, resp_delete_personal_access_toke gl.personal_access_tokens.delete(token_id) -def test_rotate_project_access_token(gl, resp_rotate_personal_access_token): +def test_rotate_personal_access_token(gl, resp_rotate_personal_access_token): access_token = gl.personal_access_tokens.get(1, lazy=True) access_token.rotate() assert isinstance(access_token, PersonalAccessToken) assert access_token.token == "s3cr3t" + + +def test_self_rotate_personal_access_token(gl, resp_self_rotate_personal_access_token): + access_token = gl.personal_access_tokens.get(1, lazy=True) + access_token.rotate(self_rotate=True) + assert isinstance(access_token, PersonalAccessToken) + assert access_token.token == "s3cr3t" + + # Verify that the url contains "self" + rotation_calls = resp_self_rotate_personal_access_token.calls + assert len(rotation_calls) == 1 + assert "self/rotate" in rotation_calls[0].request.url diff --git a/tests/unit/objects/test_project_access_tokens.py b/tests/unit/objects/test_project_access_tokens.py index b63eeaa32..77b5108fe 100644 --- a/tests/unit/objects/test_project_access_tokens.py +++ b/tests/unit/objects/test_project_access_tokens.py @@ -91,6 +91,19 @@ def resp_rotate_project_access_token(token_content): yield rsps +@pytest.fixture +def resp_self_rotate_project_access_token(token_content): + with responses.RequestsMock() as rsps: + rsps.add( + method=responses.POST, + url="http://localhost/api/v4/projects/1/access_tokens/self/rotate", + json=token_content, + content_type="application/json", + status=200, + ) + yield rsps + + def test_list_project_access_tokens(gl, resp_list_project_access_token): access_tokens = gl.projects.get(1, lazy=True).access_tokens.list() assert len(access_tokens) == 1 @@ -127,3 +140,17 @@ def test_rotate_project_access_token(project, resp_rotate_project_access_token): access_token.rotate() assert isinstance(access_token, ProjectAccessToken) assert access_token.token == "s3cr3t" + + +def test_self_rotate_project_access_token( + project, resp_self_rotate_project_access_token +): + access_token = project.access_tokens.get(1, lazy=True) + access_token.rotate(self_rotate=True) + assert isinstance(access_token, ProjectAccessToken) + assert access_token.token == "s3cr3t" + + # Verify that the url contains "self" + rotation_calls = resp_self_rotate_project_access_token.calls + assert len(rotation_calls) == 1 + assert "self/rotate" in rotation_calls[0].request.url From 78c0c038290b6d5211610662a960fecdd37678d3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 02:34:00 +0000 Subject: [PATCH 016/102] chore(deps): update all non-major dependencies --- .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29d7f0f44..17d514b11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.2 + uses: codecov/codecov-action@v5.4.3 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -102,7 +102,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.2 + uses: codecov/codecov-action@v5.4.3 with: files: ./coverage.xml flags: unit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 362293588..3e6d63686 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.7.0 + rev: v4.7.2 hooks: - id: commitizen stages: [commit-msg] diff --git a/requirements-lint.txt b/requirements-lint.txt index ae1d21d5d..c52881ecc 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,7 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.7.0 +commitizen==4.7.2 flake8==7.2.0 isort==6.0.1 mypy==1.15.0 @@ -9,6 +9,6 @@ pylint==3.3.7 pytest==8.3.5 responses==0.25.7 respx==0.22.0 -types-PyYAML==6.0.12.20250402 -types-requests==2.32.0.20250328 -types-setuptools==80.4.0.20250511 +types-PyYAML==6.0.12.20250516 +types-requests==2.32.0.20250515 +types-setuptools==80.7.0.20250516 From 5a4acabafef9167bf92332bead43b3c77be1cbac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 13:02:47 +0000 Subject: [PATCH 017/102] chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v40 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e6d63686..1b4a91338 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 39.264.0 + rev: 40.16.0 hooks: - id: renovate-config-validator From 4fef9f6f70bb391b10d88c8cec604abdc1d2df66 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 03:29:00 +0000 Subject: [PATCH 018/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 4 ++-- requirements-test.txt | 2 +- requirements.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b4a91338..aef5e4908 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.7.2 + rev: v4.8.2 hooks: - id: commitizen stages: [commit-msg] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 40.16.0 + rev: 40.31.0 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index c52881ecc..0620fc57d 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,7 +1,7 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.7.2 +commitizen==4.8.2 flake8==7.2.0 isort==6.0.1 mypy==1.15.0 @@ -11,4 +11,4 @@ responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250516 types-requests==2.32.0.20250515 -types-setuptools==80.7.0.20250516 +types-setuptools==80.8.0.20250521 diff --git a/requirements-test.txt b/requirements-test.txt index 6d504f4da..cfe179bf3 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.9.0 build==1.2.2.post1 -coverage==7.8.0 +coverage==7.8.2 pytest-console-scripts==1.4.1 pytest-cov==6.1.1 pytest-github-actions-annotate-failures==0.3.0 diff --git a/requirements.txt b/requirements.txt index f2b6882f1..5166aa6ee 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -gql==3.5.2 +gql==3.5.3 httpx==0.28.1 requests==2.32.3 requests-toolbelt==1.0.0 From f49d54e6efd8a9069d3424fa10336564b416fd05 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 03:46:23 +0000 Subject: [PATCH 019/102] chore(deps): update python-semantic-release/python-semantic-release action to v10 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b679bb4d0..72f22f125 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v9.21.1 + uses: python-semantic-release/python-semantic-release@v10.0.2 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} From 8bae3b54118bdc4e65af4a470258cf571f4f4c21 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Wed, 4 Jun 2025 02:38:06 +0000 Subject: [PATCH 020/102] chore: release v6.0.0 --- gitlab/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/_version.py b/gitlab/_version.py index 695245ebb..24f57a764 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "5.6.0" +__version__ = "6.0.0" From 306c4b1931e2b03d7cbcef5773668e876d5644b1 Mon Sep 17 00:00:00 2001 From: Pierre Colson Date: Wed, 21 May 2025 10:06:44 +0200 Subject: [PATCH 021/102] feat(api): pipeline inputs support (#3194) --- gitlab/v4/objects/projects.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py index 0eaceb5a6..b415a8b98 100644 --- a/gitlab/v4/objects/projects.py +++ b/gitlab/v4/objects/projects.py @@ -429,6 +429,7 @@ def trigger_pipeline( ref: str, token: str, variables: dict[str, Any] | None = None, + inputs: dict[str, Any] | None = None, **kwargs: Any, ) -> ProjectPipeline: """Trigger a CI build. @@ -439,6 +440,7 @@ def trigger_pipeline( ref: Commit to build; can be a branch name or a tag token: The trigger token variables: Variables passed to the build script + inputs: Inputs passed to the build script **kwargs: Extra options to send to the server (e.g. sudo) Raises: @@ -446,8 +448,14 @@ def trigger_pipeline( GitlabCreateError: If the server failed to perform the request """ variables = variables or {} + inputs = inputs or {} path = f"/projects/{self.encoded_id}/trigger/pipeline" - post_data = {"ref": ref, "token": token, "variables": variables} + post_data = { + "ref": ref, + "token": token, + "variables": variables, + "inputs": inputs, + } attrs = self.manager.gitlab.http_post(path, post_data=post_data, **kwargs) if TYPE_CHECKING: assert isinstance(attrs, dict) From 98c13074127ae46d85545498746d55c8b75aef48 Mon Sep 17 00:00:00 2001 From: darkhaniop <72267237+darkhaniop@users.noreply.github.com> Date: Wed, 23 Apr 2025 12:11:56 +0900 Subject: [PATCH 022/102] feat(api): add listing user contributed projects --- docs/gl_objects/users.rst | 4 ++++ gitlab/v4/objects/users.py | 14 ++++++++++++++ tests/unit/objects/test_users.py | 27 ++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/gl_objects/users.rst b/docs/gl_objects/users.rst index 185167f92..5ebfa296b 100644 --- a/docs/gl_objects/users.rst +++ b/docs/gl_objects/users.rst @@ -107,6 +107,10 @@ Get the followings of a user:: user.following_users.list(get_all=True) +List a user's contributed projects:: + + user.contributed_projects.list(get_all=True) + List a user's starred projects:: user.starred_projects.list(get_all=True) diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py index 2c7c28a2c..dec0b375d 100644 --- a/gitlab/v4/objects/users.py +++ b/gitlab/v4/objects/users.py @@ -68,6 +68,8 @@ "UserMembershipManager", "UserProject", "UserProjectManager", + "UserContributedProject", + "UserContributedProjectManager", ] @@ -182,6 +184,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject): memberships: UserMembershipManager personal_access_tokens: UserPersonalAccessTokenManager projects: UserProjectManager + contributed_projects: UserContributedProjectManager starred_projects: StarredProjectManager status: UserStatusManager @@ -665,6 +668,17 @@ def list( return super().list(path=path, iterator=iterator, **kwargs) +class UserContributedProject(RESTObject): + _id_attr = "id" + _repr_attr = "path_with_namespace" + + +class UserContributedProjectManager(ListMixin[UserContributedProject]): + _path = "/users/{user_id}/contributed_projects" + _obj_cls = UserContributedProject + _from_parent_attrs = {"user_id": "id"} + + class StarredProject(RESTObject): pass diff --git a/tests/unit/objects/test_users.py b/tests/unit/objects/test_users.py index c120581fe..ff8c4479d 100644 --- a/tests/unit/objects/test_users.py +++ b/tests/unit/objects/test_users.py @@ -7,7 +7,13 @@ import pytest import responses -from gitlab.v4.objects import StarredProject, User, UserMembership, UserStatus +from gitlab.v4.objects import ( + StarredProject, + User, + UserContributedProject, + UserMembership, + UserStatus, +) from .test_projects import project_content @@ -242,6 +248,19 @@ def resp_starred_projects(): yield rsps +@pytest.fixture +def resp_contributed_projects(): + with responses.RequestsMock() as rsps: + rsps.add( + method=responses.GET, + url="http://localhost/api/v4/users/1/contributed_projects", + json=[project_content], + content_type="application/json", + status=200, + ) + yield rsps + + @pytest.fixture def resp_runner_create(): with responses.RequestsMock() as rsps: @@ -314,6 +333,12 @@ def test_list_followers(user, resp_followers_following): assert followings[1].id == 4 +def test_list_contributed_projects(user, resp_contributed_projects): + projects = user.contributed_projects.list() + assert isinstance(projects[0], UserContributedProject) + assert projects[0].id == project_content["id"] + + def test_list_starred_projects(user, resp_starred_projects): projects = user.starred_projects.list() assert isinstance(projects[0], StarredProject) From bfd31a867547dffb2c2d54127e184fefa058cb30 Mon Sep 17 00:00:00 2001 From: xakepnz Date: Fri, 11 Apr 2025 23:29:28 +1200 Subject: [PATCH 023/102] feat(groups): add protectedbranches to group class (#3164) --- docs/gl_objects/protected_branches.rst | 13 +++++++++---- gitlab/v4/objects/branches.py | 24 ++++++++++++++++++++++++ gitlab/v4/objects/groups.py | 2 ++ tests/functional/api/test_groups.py | 25 +++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 4 deletions(-) diff --git a/docs/gl_objects/protected_branches.rst b/docs/gl_objects/protected_branches.rst index ce5e300db..a1b1ef5c5 100644 --- a/docs/gl_objects/protected_branches.rst +++ b/docs/gl_objects/protected_branches.rst @@ -2,8 +2,8 @@ Protected branches ################## -You can define a list of protected branch names on a repository. Names can use -wildcards (``*``). +You can define a list of protected branch names on a repository or group. +Names can use wildcards (``*``). References ---------- @@ -13,19 +13,24 @@ References + :class:`gitlab.v4.objects.ProjectProtectedBranch` + :class:`gitlab.v4.objects.ProjectProtectedBranchManager` + :attr:`gitlab.v4.objects.Project.protectedbranches` + + :class:`gitlab.v4.objects.GroupProtectedBranch` + + :class:`gitlab.v4.objects.GroupProtectedBranchManager` + + :attr:`gitlab.v4.objects.Group.protectedbranches` * GitLab API: https://docs.gitlab.com/api/protected_branches#protected-branches-api Examples -------- -Get the list of protected branches for a project:: +Get the list of protected branches for a project or group:: - p_branches = project.protectedbranches.list(get_all=True) + p_branches = project.protectedbranches.list() + p_branches = group.protectedbranches.list() Get a single protected branch:: p_branch = project.protectedbranches.get('main') + p_branch = group.protectedbranches.get('main') Update a protected branch:: diff --git a/gitlab/v4/objects/branches.py b/gitlab/v4/objects/branches.py index 0724476a6..12dbf8848 100644 --- a/gitlab/v4/objects/branches.py +++ b/gitlab/v4/objects/branches.py @@ -49,3 +49,27 @@ class ProjectProtectedBranchManager(CRUDMixin[ProjectProtectedBranch]): ), ) _update_method = UpdateMethod.PATCH + + +class GroupProtectedBranch(SaveMixin, ObjectDeleteMixin, RESTObject): + _id_attr = "name" + + +class GroupProtectedBranchManager(CRUDMixin[GroupProtectedBranch]): + _path = "/groups/{group_id}/protected_branches" + _obj_cls = GroupProtectedBranch + _from_parent_attrs = {"group_id": "id"} + _create_attrs = RequiredOptional( + required=("name",), + optional=( + "push_access_level", + "merge_access_level", + "unprotect_access_level", + "allow_force_push", + "allowed_to_push", + "allowed_to_merge", + "allowed_to_unprotect", + "code_owner_approval_required", + ), + ) + _update_method = UpdateMethod.PATCH diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index 473b40391..7a1767817 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -24,6 +24,7 @@ from .audit_events import GroupAuditEventManager # noqa: F401 from .badges import GroupBadgeManager # noqa: F401 from .boards import GroupBoardManager # noqa: F401 +from .branches import GroupProtectedBranchManager # noqa: F401 from .clusters import GroupClusterManager # noqa: F401 from .container_registry import GroupRegistryRepositoryManager # noqa: F401 from .custom_attributes import GroupCustomAttributeManager # noqa: F401 @@ -102,6 +103,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): packages: GroupPackageManager projects: GroupProjectManager shared_projects: SharedProjectManager + protectedbranches: GroupProtectedBranchManager pushrules: GroupPushRulesManager registry_repositories: GroupRegistryRepositoryManager runners: GroupRunnerManager diff --git a/tests/functional/api/test_groups.py b/tests/functional/api/test_groups.py index 2485ac660..301fea6a2 100644 --- a/tests/functional/api/test_groups.py +++ b/tests/functional/api/test_groups.py @@ -312,6 +312,31 @@ def test_group_hooks(group): hook.delete() +def test_group_protected_branches(group, gitlab_version): + # Updating a protected branch at the group level is possible from Gitlab 15.9 + # https://docs.gitlab.com/api/group_protected_branches/ + can_update_prot_branch = gitlab_version.major > 15 or ( + gitlab_version.major == 15 and gitlab_version.minor >= 9 + ) + + p_b = group.protectedbranches.create( + {"name": "*-stable", "allow_force_push": False} + ) + assert p_b.name == "*-stable" + assert not p_b.allow_force_push + assert p_b in group.protectedbranches.list() + + if can_update_prot_branch: + p_b.allow_force_push = True + p_b.save() + + p_b = group.protectedbranches.get("*-stable") + if can_update_prot_branch: + assert p_b.allow_force_push + + p_b.delete() + + def test_group_transfer(gl, group): transfer_group = gl.groups.create( {"name": "transfer-test-group", "path": "transfer-test-group"} From 378a836bf5744ca6c9409dd60899e5d2f90b55be Mon Sep 17 00:00:00 2001 From: Novi Sandlin Date: Sun, 23 Mar 2025 13:02:20 -0700 Subject: [PATCH 024/102] feat(api): add support for project tag list filters --- gitlab/v4/objects/tags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gitlab/v4/objects/tags.py b/gitlab/v4/objects/tags.py index 7a559daa7..ad04b4928 100644 --- a/gitlab/v4/objects/tags.py +++ b/gitlab/v4/objects/tags.py @@ -19,6 +19,7 @@ class ProjectTagManager(NoUpdateMixin[ProjectTag]): _path = "/projects/{project_id}/repository/tags" _obj_cls = ProjectTag _from_parent_attrs = {"project_id": "id"} + _list_filters = ("order_by", "sort", "search") _create_attrs = RequiredOptional( required=("tag_name", "ref"), optional=("message",) ) From f734c586e3fe5a0e866bcf60030107ca142fa763 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Mon, 9 Jun 2025 12:44:41 -0700 Subject: [PATCH 025/102] chore: update to mypy 1.16.0 and resolve issues found There was an error in the type-hints that was detected when updating to mypy 1.16.0 The error was: $ mypy gitlab/v4/cli.py:411: error: Argument 1 to "cls_to_gitlab_resource" has incompatible type "type[Any]"; expected "RESTObject" [arg-type] Found 1 error in 1 file (checked 246 source files) --- gitlab/cli.py | 2 +- gitlab/v4/cli.py | 2 +- requirements-lint.txt | 2 +- tests/unit/test_cli.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gitlab/cli.py b/gitlab/cli.py index a3ff5b5b4..ca4734190 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -107,7 +107,7 @@ def gitlab_resource_to_cls( return class_type -def cls_to_gitlab_resource(cls: RESTObject) -> str: +def cls_to_gitlab_resource(cls: type[RESTObject]) -> str: dasherized_uppercase = camel_upperlower_regex.sub(r"\1-\2", cls.__name__) dasherized_lowercase = camel_lowerupper_regex.sub(r"\1-\2", dasherized_uppercase) return dasherized_lowercase.lower() diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index 067a0a155..87fcaf261 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -394,7 +394,7 @@ def extend_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser: subparsers.required = True # populate argparse for all Gitlab Object - classes = set() + classes: set[type[gitlab.base.RESTObject]] = set() for cls in gitlab.v4.objects.__dict__.values(): if not isinstance(cls, type): continue diff --git a/requirements-lint.txt b/requirements-lint.txt index 0620fc57d..c8006e667 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -4,7 +4,7 @@ black==25.1.0 commitizen==4.8.2 flake8==7.2.0 isort==6.0.1 -mypy==1.15.0 +mypy==1.16.0 pylint==3.3.7 pytest==8.3.5 responses==0.25.7 diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index af3dd3380..cad27afba 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -161,7 +161,7 @@ def error(self, message): "Raise error instead of exiting on invalid arguments, to make testing easier" raise ValueError(message) - class Fake: + class Fake(gitlab.base.RESTObject): _id_attr = None class FakeManager(CreateMixin, UpdateMixin, gitlab.base.RESTManager): From ff579a6f4f2a227eb2f4d8c63dfd3de78dbcbaf4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:39:55 +0000 Subject: [PATCH 026/102] chore(deps): update dependency requests to v2.32.4 [security] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5166aa6ee..7941900de 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ gql==3.5.3 httpx==0.28.1 -requests==2.32.3 +requests==2.32.4 requests-toolbelt==1.0.0 From a87ba63b613ce67cf227789dc6c5c4bac3a5dfe5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:57:13 +0000 Subject: [PATCH 027/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 6 +++--- requirements-docker.txt | 2 +- requirements-lint.txt | 8 ++++---- requirements-test.txt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aef5e4908..4d24be73d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.2 + rev: v4.8.3 hooks: - id: commitizen stages: [commit-msg] @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.16.0 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 40.31.0 + rev: 40.49.0 hooks: - id: renovate-config-validator diff --git a/requirements-docker.txt b/requirements-docker.txt index 98b70440c..ee34d1fba 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -1,3 +1,3 @@ -r requirements.txt -r requirements-test.txt -pytest-docker==3.2.1 +pytest-docker==3.2.2 diff --git a/requirements-lint.txt b/requirements-lint.txt index c8006e667..4711a5403 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,14 +1,14 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.8.2 +commitizen==4.8.3 flake8==7.2.0 isort==6.0.1 mypy==1.16.0 pylint==3.3.7 -pytest==8.3.5 +pytest==8.4.0 responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250516 -types-requests==2.32.0.20250515 -types-setuptools==80.8.0.20250521 +types-requests==2.32.0.20250602 +types-setuptools==80.9.0.20250529 diff --git a/requirements-test.txt b/requirements-test.txt index cfe179bf3..e5149cf70 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,7 +5,7 @@ coverage==7.8.2 pytest-console-scripts==1.4.1 pytest-cov==6.1.1 pytest-github-actions-annotate-failures==0.3.0 -pytest==8.3.5 +pytest==8.4.0 PyYaml==6.0.2 responses==0.25.7 respx==0.22.0 From 2bab8d4b6fe9752da346fd8a7b261341ba304016 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 07:08:25 +0000 Subject: [PATCH 028/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 2 +- requirements-test.txt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72f22f125..3acee16f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.0.2 + uses: python-semantic-release/python-semantic-release@v10.1.0 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d24be73d..3dda94ccf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 40.49.0 + rev: 40.57.1 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 4711a5403..1281b5c87 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -10,5 +10,5 @@ pytest==8.4.0 responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250516 -types-requests==2.32.0.20250602 +types-requests==2.32.4.20250611 types-setuptools==80.9.0.20250529 diff --git a/requirements-test.txt b/requirements-test.txt index e5149cf70..307f83782 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,9 +1,9 @@ -r requirements.txt anyio==4.9.0 build==1.2.2.post1 -coverage==7.8.2 +coverage==7.9.1 pytest-console-scripts==1.4.1 -pytest-cov==6.1.1 +pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 pytest==8.4.0 PyYaml==6.0.2 From 45dda50ff4c0e01307480befa86498600563f818 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 18 Jun 2025 08:06:53 -0700 Subject: [PATCH 029/102] docs: update CONTRIBUTING.rst with policy on issue management Also update the `stale` job to close issues with no activity, unless they are assigned to someone. --- .github/workflows/stale.yml | 53 ++++++++++++++++++++++++++++++++----- CONTRIBUTING.rst | 36 +++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 7 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index cdfaee27b..e65835c30 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -20,16 +20,56 @@ jobs: stale-issue-label: "stale" stale-pr-label: "stale" - any-of-labels: 'need info,Waiting for response,stale' + # If an issue/PR has an assignee it won't be marked as stale + exempt-all-assignees: true stale-issue-message: > - This issue was marked stale because it has been open 60 days with no - activity. Please remove the stale label or comment on this issue. Otherwise, - it will be closed in 15 days. + This issue was marked stale because it has been open 60 days with + no activity. Please remove the stale label or comment on this + issue. Otherwise, it will be closed in 15 days. + + As an open-source project, we rely on community contributions to + address many of the reported issues. Without a proposed fix or + active work towards a solution it is our policy to close inactive + issues. This is documented in CONTRIBUTING.rst + + **How to keep this issue open:** + * If you are still experiencing this issue and are willing to + investigate a fix, please comment and let us know. + * If you (or someone else) can propose a pull request with a + solution, that would be fantastic. + * Any significant update or active discussion indicating progress + will also prevent closure. + + We value your input. If you can help provide a fix, we'd be happy + to keep this issue open and support your efforts. + days-before-issue-stale: 60 days-before-issue-close: 15 close-issue-message: > - This issue was closed because it has been marked stale for 15 days with no - activity. If this issue is still valid, please re-open. + This issue was closed because it has been marked stale for 15 days + with no activity. + + This open-source project relies on community contributions, and + while we value all feedback, we have a limited capacity to address + every issue without a clear path forward. + + Currently, this issue hasn't received a proposed fix, and there + hasn't been recent active discussion indicating someone is planning + to work on it. To maintain a manageable backlog and focus our + efforts, we will be closing this issue for now. + + **This doesn't mean the issue isn't valid or important.** If you or + anyone else in the community is willing to investigate and propose + a solution (e.g., by submitting a pull request), please do. + + We believe that those who feel a bug is important enough to fix + should ideally be part of the solution. Your contributions are + highly welcome. + + Thank you for your understanding and potential future + contributions. + + This is documented in CONTRIBUTING.rst stale-pr-message: > This Pull Request (PR) was marked stale because it has been open 90 days @@ -40,4 +80,3 @@ jobs: close-pr-message: > This PR was closed because it has been marked stale for 15 days with no activity. If this PR is still valid, please re-open. - diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 90c6c1e70..9b07ada11 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -9,6 +9,42 @@ You can contribute to the project in multiple ways: * Add unit and functional tests * Everything else you can think of +Issue Management and Our Approach to Contributions +-------------------------------------------------- + +We value every contribution and bug report. However, as an open-source project +with limited maintainer resources, we rely heavily on the community to help us +move forward. + +**Our Policy on Inactive Issues:** + +To keep our issue tracker manageable and focused on actionable items, we have +the following approach: + +* **We encourage reporters to propose solutions:** If you report an issue, we + strongly encourage you to also think about how it might be fixed and try to + implement that fix. +* **Community interest is key:** Issues that garner interest from the community + (e.g., multiple users confirming, discussions on solutions, offers to help) + are more likely to be addressed. +* **Closing inactive issues:** If an issue report doesn't receive a proposed + fix from the original reporter or anyone else in the community, and there's + no active discussion or indication that someone is willing to work on it + after a reasonable period, it may be closed. + + * When closing such an issue, we will typically leave a comment explaining + that it's being closed due to inactivity and a lack of a proposed fix. + +* **Reopening issues:** This doesn't mean the issue isn't valid. If you (or + someone else) are interested in working on a fix for a closed issue, please + comment on the issue. We are more than happy to reopen it and discuss your + proposed pull request or solution. We greatly appreciate it when community + members take ownership of fixing issues they care about. + +We believe this approach helps us focus our efforts effectively and empowers +the community to contribute directly to the areas they are most passionate +about. + Development workflow -------------------- From ba6f174896f908ba711e1e3e8ebf4692c86bd3d4 Mon Sep 17 00:00:00 2001 From: Matthias Reiff <69197422+matthias-reiff@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:38:53 +0200 Subject: [PATCH 030/102] feat(const): add PLANNER_ACCESS constant --- gitlab/const.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitlab/const.py b/gitlab/const.py index 9e0b766ea..7a0492e64 100644 --- a/gitlab/const.py +++ b/gitlab/const.py @@ -93,6 +93,7 @@ class PipelineStatus(GitlabEnum): NO_ACCESS = AccessLevel.NO_ACCESS.value MINIMAL_ACCESS = AccessLevel.MINIMAL_ACCESS.value GUEST_ACCESS = AccessLevel.GUEST.value +PLANNER_ACCESS = AccessLevel.PLANNER.value REPORTER_ACCESS = AccessLevel.REPORTER.value DEVELOPER_ACCESS = AccessLevel.DEVELOPER.value MAINTAINER_ACCESS = AccessLevel.MAINTAINER.value @@ -151,6 +152,7 @@ class PipelineStatus(GitlabEnum): "NOTIFICATION_LEVEL_PARTICIPATING", "NOTIFICATION_LEVEL_WATCH", "OWNER_ACCESS", + "PLANNER_ACCESS", "REPORTER_ACCESS", "SEARCH_SCOPE_BLOBS", "SEARCH_SCOPE_COMMITS", From b2c72256d828586fe3545455579ba30b69e68aad Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sat, 28 Jun 2025 01:13:44 +0000 Subject: [PATCH 031/102] chore: release v6.1.0 --- gitlab/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/_version.py b/gitlab/_version.py index 24f57a764..24c1a84f8 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.0.0" +__version__ = "6.1.0" From d3f31a25e7113d32000cf0c9765692e40c63be7a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 01:49:56 +0000 Subject: [PATCH 032/102] chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v41 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3dda94ccf..4f7ac25f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 40.57.1 + rev: 41.17.2 hooks: - id: renovate-config-validator From d25b33f942f5fbbf1dfb5feacd397f0815708daf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 02:07:40 +0000 Subject: [PATCH 033/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 6 +++--- requirements-test.txt | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3acee16f9..396eb59b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.1.0 + uses: python-semantic-release/python-semantic-release@v10.2.0 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f7ac25f0..e7235f125 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - id: commitizen stages: [commit-msg] - repo: https://github.com/pycqa/flake8 - rev: 7.2.0 + rev: 7.3.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.0 + rev: v1.16.1 hooks: - id: mypy args: [] diff --git a/requirements-lint.txt b/requirements-lint.txt index 1281b5c87..b6b718d18 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -2,11 +2,11 @@ argcomplete==2.0.0 black==25.1.0 commitizen==4.8.3 -flake8==7.2.0 +flake8==7.3.0 isort==6.0.1 -mypy==1.16.0 +mypy==1.16.1 pylint==3.3.7 -pytest==8.4.0 +pytest==8.4.1 responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250516 diff --git a/requirements-test.txt b/requirements-test.txt index 307f83782..eb6557cd5 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,7 +5,7 @@ coverage==7.9.1 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 -pytest==8.4.0 +pytest==8.4.1 PyYaml==6.0.2 responses==0.25.7 respx==0.22.0 From 9c095bda18b24342727f01f4efeeb81c033fbb83 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 12:42:02 +0000 Subject: [PATCH 034/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-docker.txt | 2 +- requirements-test.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7235f125..24f9e68df 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.17.2 + rev: 41.23.4 hooks: - id: renovate-config-validator diff --git a/requirements-docker.txt b/requirements-docker.txt index ee34d1fba..532609b3f 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -1,3 +1,3 @@ -r requirements.txt -r requirements-test.txt -pytest-docker==3.2.2 +pytest-docker==3.2.3 diff --git a/requirements-test.txt b/requirements-test.txt index eb6557cd5..26d3b35af 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.9.0 build==1.2.2.post1 -coverage==7.9.1 +coverage==7.9.2 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 From 0ef20d1b0ee6cd82c4e34003aca4c0c72935f4d9 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 25 Jun 2025 08:38:36 -0700 Subject: [PATCH 035/102] ci(stale): improve formatting of stale message Have it maintain the formatting of the message with the line breaks. --- .github/workflows/stale.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e65835c30..e2f1c1923 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -22,7 +22,7 @@ jobs: # If an issue/PR has an assignee it won't be marked as stale exempt-all-assignees: true - stale-issue-message: > + stale-issue-message: | This issue was marked stale because it has been open 60 days with no activity. Please remove the stale label or comment on this issue. Otherwise, it will be closed in 15 days. @@ -43,9 +43,12 @@ jobs: We value your input. If you can help provide a fix, we'd be happy to keep this issue open and support your efforts. + This is documented in CONTRIBUTING.rst + https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst + days-before-issue-stale: 60 days-before-issue-close: 15 - close-issue-message: > + close-issue-message: | This issue was closed because it has been marked stale for 15 days with no activity. @@ -70,6 +73,7 @@ jobs: contributions. This is documented in CONTRIBUTING.rst + https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst stale-pr-message: > This Pull Request (PR) was marked stale because it has been open 90 days From 326e1a46881467f41dc3de5f060ac654924fbe40 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 4 Jul 2025 12:46:49 -0700 Subject: [PATCH 036/102] ci(stale): increase `operations-per-run` to 500 The default value is 30 and it is not able to process all the issues/PRs. In fact it is failing to make progress. Each day it processes the same issues/PRs and then stops. It doesn't reach the other issues/Prs. Increase to 500, the GitLab limit is actually 3000. --- .github/workflows/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e2f1c1923..0b6cbe5db 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -17,6 +17,7 @@ jobs: steps: - uses: actions/stale@v9.1.0 with: + operations-per-run: 500 stale-issue-label: "stale" stale-pr-label: "stale" From 2f20634b9700bc802177278ffdd7bdf83ef1605a Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Sat, 7 Jun 2025 09:14:25 -0700 Subject: [PATCH 037/102] build(release): use correct python-semantic-release/publish-action The previous 'python-semantic-release/upload-to-gh-release' action has been deprecated. Closes: #3210 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 396eb59b2..b1495438e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/upload-to-gh-release@0a92b5d7ebfc15a84f9801ebd1bf706343d43711 # v9.8.9 + uses: python-semantic-release/publish-action@v10.0.2 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} From be25c167c8cc1e941b8861109a0c055d34e0e2f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 01:02:35 +0000 Subject: [PATCH 038/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1495438e..576c1befb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.0.2 + uses: python-semantic-release/publish-action@v10.2.0 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24f9e68df..f12339fb3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.23.4 + rev: 41.23.5 hooks: - id: renovate-config-validator From 865339ac037fb125280180b05a2c4e44067dc5e9 Mon Sep 17 00:00:00 2001 From: Massimiliano Riva Date: Fri, 18 Jul 2025 15:31:44 +0200 Subject: [PATCH 039/102] feat(api): add ListMixin to ProjectMergeRequestDiscussionNoteManager Closes: #3180 --- gitlab/v4/objects/notes.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gitlab/v4/objects/notes.py b/gitlab/v4/objects/notes.py index f104c3f5d..56568d273 100644 --- a/gitlab/v4/objects/notes.py +++ b/gitlab/v4/objects/notes.py @@ -164,10 +164,7 @@ class ProjectMergeRequestDiscussionNote(SaveMixin, ObjectDeleteMixin, RESTObject class ProjectMergeRequestDiscussionNoteManager( - GetMixin[ProjectMergeRequestDiscussionNote], - CreateMixin[ProjectMergeRequestDiscussionNote], - UpdateMixin[ProjectMergeRequestDiscussionNote], - DeleteMixin[ProjectMergeRequestDiscussionNote], + CRUDMixin[ProjectMergeRequestDiscussionNote] ): _path = ( "/projects/{project_id}/merge_requests/{mr_iid}/" From f908f0e82840a5df374e8fbfb1298608d23f02bd Mon Sep 17 00:00:00 2001 From: Massimiliano Riva Date: Fri, 18 Jul 2025 15:52:52 +0200 Subject: [PATCH 040/102] feat(api): add ListMixin to ProjectIssueDiscussionNoteManager --- gitlab/v4/objects/notes.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gitlab/v4/objects/notes.py b/gitlab/v4/objects/notes.py index 56568d273..3e83d9be1 100644 --- a/gitlab/v4/objects/notes.py +++ b/gitlab/v4/objects/notes.py @@ -128,12 +128,7 @@ class ProjectIssueDiscussionNote(SaveMixin, ObjectDeleteMixin, RESTObject): pass -class ProjectIssueDiscussionNoteManager( - GetMixin[ProjectIssueDiscussionNote], - CreateMixin[ProjectIssueDiscussionNote], - UpdateMixin[ProjectIssueDiscussionNote], - DeleteMixin[ProjectIssueDiscussionNote], -): +class ProjectIssueDiscussionNoteManager(CRUDMixin[ProjectIssueDiscussionNote]): _path = ( "/projects/{project_id}/issues/{issue_iid}/discussions/{discussion_id}/notes" ) From 3b8fbf46f3d867481d0544ae4f0fd44a8dc60b9e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 23:39:56 +0000 Subject: [PATCH 041/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f12339fb3..f18249f20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.1 + rev: v1.17.0 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.23.5 + rev: 41.42.1 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index b6b718d18..73eb2fda0 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -4,7 +4,7 @@ black==25.1.0 commitizen==4.8.3 flake8==7.3.0 isort==6.0.1 -mypy==1.16.1 +mypy==1.17.0 pylint==3.3.7 pytest==8.4.1 responses==0.25.7 From b483ece8b7d1391c7a3f099d9269d2ec7e1f5ca1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 00:17:12 +0000 Subject: [PATCH 042/102] chore(deps): update dependency furo to v2025 --- requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index c951d81d5..39f5f61e2 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,5 +1,5 @@ -r requirements.txt -furo==2024.8.6 +furo==2025.7.19 jinja2==3.1.6 myst-parser==4.0.1 sphinx==8.2.3 From 5f3aa2f491167184869333fbbec2ec5749f1c172 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Mon, 28 Jul 2025 01:25:29 +0000 Subject: [PATCH 043/102] chore: release v6.2.0 --- gitlab/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/_version.py b/gitlab/_version.py index 24c1a84f8..2f7a85281 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.1.0" +__version__ = "6.2.0" From 18c946fbb76c84a20eb5bb33b769aa3ff3708255 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Jul 2025 07:43:06 +0000 Subject: [PATCH 044/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f18249f20..b22f87245 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.42.1 + rev: 41.43.0 hooks: - id: renovate-config-validator diff --git a/requirements-test.txt b/requirements-test.txt index 26d3b35af..3b6e94b77 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.9.0 build==1.2.2.post1 -coverage==7.9.2 +coverage==7.10.1 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 From bf7a60a414383bb2436efb9b2f3b310c900d5254 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 08:07:06 +0000 Subject: [PATCH 045/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 4 ++-- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 4 ++-- requirements-test.txt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 576c1befb..32b2573be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.2.0 + uses: python-semantic-release/python-semantic-release@v10.3.0 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.2.0 + uses: python-semantic-release/publish-action@v10.3.0 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b22f87245..f838e4380 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.0 + rev: v1.17.1 hooks: - id: mypy args: [] diff --git a/requirements-lint.txt b/requirements-lint.txt index 73eb2fda0..1833fd410 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -4,11 +4,11 @@ black==25.1.0 commitizen==4.8.3 flake8==7.3.0 isort==6.0.1 -mypy==1.17.0 +mypy==1.17.1 pylint==3.3.7 pytest==8.4.1 responses==0.25.7 respx==0.22.0 types-PyYAML==6.0.12.20250516 types-requests==2.32.4.20250611 -types-setuptools==80.9.0.20250529 +types-setuptools==80.9.0.20250801 diff --git a/requirements-test.txt b/requirements-test.txt index 3b6e94b77..61f3ab713 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.9.0 -build==1.2.2.post1 -coverage==7.10.1 +build==1.3.0 +coverage==7.10.2 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 From f3c6678482b7ca35b1dd1e3bc49fc0c56cd03639 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Sun, 13 Jul 2025 23:27:01 -0700 Subject: [PATCH 046/102] feat: add sync method to force remote mirror updates Add ProjectRemoteMirror.sync() method to trigger immediate push mirror updates. Closes: #3223 --- docs/gl_objects/remote_mirrors.rst | 4 ++++ gitlab/v4/objects/projects.py | 15 ++++++++++++++- tests/unit/objects/test_remote_mirrors.py | 12 ++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/gl_objects/remote_mirrors.rst b/docs/gl_objects/remote_mirrors.rst index b4610117d..c672ca5bb 100644 --- a/docs/gl_objects/remote_mirrors.rst +++ b/docs/gl_objects/remote_mirrors.rst @@ -36,3 +36,7 @@ Update an existing remote mirror's attributes:: Delete an existing remote mirror:: mirror.delete() + +Force push mirror update:: + + mirror.sync() diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py index b415a8b98..035b9b861 100644 --- a/gitlab/v4/objects/projects.py +++ b/gitlab/v4/objects/projects.py @@ -1233,7 +1233,20 @@ def create(self, data: dict[str, Any] | None = None, **kwargs: Any) -> ProjectFo class ProjectRemoteMirror(ObjectDeleteMixin, SaveMixin, RESTObject): - pass + @cli.register_custom_action(cls_names="ProjectRemoteMirror") + @exc.on_http_error(exc.GitlabCreateError) + def sync(self, **kwargs: Any) -> dict[str, Any] | requests.Response: + """Force push mirror update. + + Args: + **kwargs: Extra options to send to the server (e.g. sudo) + + Raises: + GitlabAuthenticationError: If authentication is not correct + GitlabCreateError: If the server cannot perform the request + """ + path = f"{self.manager.path}/{self.encoded_id}/sync" + return self.manager.gitlab.http_post(path, **kwargs) class ProjectRemoteMirrorManager( diff --git a/tests/unit/objects/test_remote_mirrors.py b/tests/unit/objects/test_remote_mirrors.py index f493032e8..be2aaaaba 100644 --- a/tests/unit/objects/test_remote_mirrors.py +++ b/tests/unit/objects/test_remote_mirrors.py @@ -54,6 +54,12 @@ def resp_remote_mirrors(): url="http://localhost/api/v4/projects/1/remote_mirrors/1", status=204, ) + + rsps.add( + method=responses.POST, + url="http://localhost/api/v4/projects/1/remote_mirrors/1/sync", + status=204, + ) yield rsps @@ -81,3 +87,9 @@ def test_update_project_remote_mirror(project, resp_remote_mirrors): def test_delete_project_remote_mirror(project, resp_remote_mirrors): mirror = project.remote_mirrors.create({"url": "https://example.com"}) mirror.delete() + + +def test_sync_project_remote_mirror(project, resp_remote_mirrors): + mirror = project.remote_mirrors.create({"url": "https://example.com"}) + response = mirror.sync() + assert response.status_code == 204 From b1696be5fb223028755e303069e23e42a11cab42 Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Wed, 6 Aug 2025 14:52:00 +0100 Subject: [PATCH 047/102] feat(api): add missing ProjectPackageManager list filters `package_version` was introduced in GitLab 16.6 See: https://docs.gitlab.com/api/packages/#for-a-project --- gitlab/v4/objects/packages.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects/packages.py b/gitlab/v4/objects/packages.py index 1a59c7ec7..99edd2f83 100644 --- a/gitlab/v4/objects/packages.py +++ b/gitlab/v4/objects/packages.py @@ -220,6 +220,9 @@ class GroupPackageManager(ListMixin[GroupPackage]): "sort", "package_type", "package_name", + "package_version", + "include_versionless", + "status", ) @@ -234,7 +237,15 @@ class ProjectPackageManager( _path = "/projects/{project_id}/packages" _obj_cls = ProjectPackage _from_parent_attrs = {"project_id": "id"} - _list_filters = ("order_by", "sort", "package_type", "package_name") + _list_filters = ( + "order_by", + "sort", + "package_type", + "package_name", + "package_version", + "include_versionless", + "status", + ) class ProjectPackageFile(ObjectDeleteMixin, RESTObject): From 5fe0e715448b00a666f76cdce6db321686f6a271 Mon Sep 17 00:00:00 2001 From: Nick Brown Date: Thu, 7 Aug 2025 22:53:08 +0100 Subject: [PATCH 048/102] feat(api): add missing ProjectJob list filters See: https://docs.gitlab.com/api/jobs/#list-project-jobs --- gitlab/v4/objects/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/v4/objects/jobs.py b/gitlab/v4/objects/jobs.py index 6aa6fc460..f0062c989 100644 --- a/gitlab/v4/objects/jobs.py +++ b/gitlab/v4/objects/jobs.py @@ -346,5 +346,5 @@ class ProjectJobManager(RetrieveMixin[ProjectJob]): _path = "/projects/{project_id}/jobs" _obj_cls = ProjectJob _from_parent_attrs = {"project_id": "id"} - _list_filters = ("scope",) + _list_filters = ("scope", "order_by", "sort") _types = {"scope": ArrayAttribute} From 2dd2e8ec656da5fee5b24434b828c6e98f3521ab Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 13:42:33 +0000 Subject: [PATCH 049/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/release.yml | 6 +++--- .github/workflows/test.yml | 10 +++++----- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 10 +++++----- requirements-precommit.txt | 2 +- requirements-test.txt | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c974f3a45..6b41b6147 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: @@ -37,7 +37,7 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d16f7fe09..6ca867c96 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 with: fetch-depth: 0 - uses: actions/setup-python@v5.6.0 diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 9fadeca81..7e4e913be 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,7 +29,7 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32b2573be..9b765529c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,14 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.3.0 + uses: python-semantic-release/python-semantic-release@v10.3.1 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.3.0 + uses: python-semantic-release/publish-action@v10.3.1 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17d514b11..2fea26396 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: version: "3.13" toxenv: py313,smoke steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v5.6.0 with: @@ -67,7 +67,7 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: @@ -89,7 +89,7 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5.6.0 with: @@ -113,7 +113,7 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" @@ -131,7 +131,7 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v4.3.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f838e4380..2f8c7c10a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v3.3.7 + rev: v3.3.8 hooks: - id: pylint additional_dependencies: @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.43.0 + rev: 41.62.2 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 1833fd410..00e69a474 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -5,10 +5,10 @@ commitizen==4.8.3 flake8==7.3.0 isort==6.0.1 mypy==1.17.1 -pylint==3.3.7 +pylint==3.3.8 pytest==8.4.1 -responses==0.25.7 +responses==0.25.8 respx==0.22.0 -types-PyYAML==6.0.12.20250516 -types-requests==2.32.4.20250611 -types-setuptools==80.9.0.20250801 +types-PyYAML==6.0.12.20250809 +types-requests==2.32.4.20250809 +types-setuptools==80.9.0.20250809 diff --git a/requirements-precommit.txt b/requirements-precommit.txt index d5c247795..3ee862221 100644 --- a/requirements-precommit.txt +++ b/requirements-precommit.txt @@ -1 +1 @@ -pre-commit==4.2.0 +pre-commit==4.3.0 diff --git a/requirements-test.txt b/requirements-test.txt index 61f3ab713..000349305 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,13 +1,13 @@ -r requirements.txt -anyio==4.9.0 +anyio==4.10.0 build==1.3.0 -coverage==7.10.2 +coverage==7.10.3 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 pytest==8.4.1 PyYaml==6.0.2 -responses==0.25.7 +responses==0.25.8 respx==0.22.0 trio==0.30.0 wheel==0.45.1 From 397cf3950699873164e33b8f0f92498d6e0f4ee9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 15:09:17 +0000 Subject: [PATCH 050/102] chore(deps): update actions/download-artifact action to v5 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2fea26396..5858b9ee5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -136,7 +136,7 @@ jobs: uses: actions/setup-python@v5.6.0 with: python-version: '3.13' - - uses: actions/download-artifact@v4.3.0 + - uses: actions/download-artifact@v5.0.0 with: name: dist path: dist From aaed51cdec65c8acabe8b9a39fd18c7e1e48519c Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Fri, 15 Aug 2025 17:25:30 +0200 Subject: [PATCH 051/102] feat(users): implement support for 'admins' in administrators 'list' Signed-off-by: Adrian DC --- gitlab/v4/objects/users.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py index dec0b375d..2c2393eba 100644 --- a/gitlab/v4/objects/users.py +++ b/gitlab/v4/objects/users.py @@ -410,6 +410,7 @@ class UserManager(CRUDMixin[User]): "custom_attributes", "status", "two_factor", + "admins", ) _create_attrs = RequiredOptional( optional=( From 2fce14409dea3fa257cb62feda96e494bc971c4c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 02:09:04 +0000 Subject: [PATCH 052/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f8c7c10a..5f492caf9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.62.2 + rev: 41.76.0 hooks: - id: renovate-config-validator diff --git a/requirements-test.txt b/requirements-test.txt index 000349305..9435bac32 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.10.0 build==1.3.0 -coverage==7.10.3 +coverage==7.10.4 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 From 36629a476ee00a623be9559792701a0992447813 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 03:29:51 +0000 Subject: [PATCH 053/102] chore(deps): update actions/checkout action to v5 --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6b41b6147..cb8eab5d6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: @@ -37,7 +37,7 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6ca867c96..0647754dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 with: fetch-depth: 0 - uses: actions/setup-python@v5.6.0 diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 7e4e913be..4da71860a 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,7 +29,7 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b765529c..cdf090887 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5858b9ee5..f43bfe259 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: version: "3.13" toxenv: py313,smoke steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v5.6.0 with: @@ -67,7 +67,7 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: @@ -89,7 +89,7 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5.6.0 with: @@ -113,7 +113,7 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - uses: actions/setup-python@v5.6.0 with: python-version: "3.13" @@ -131,7 +131,7 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v4.3.0 + - uses: actions/checkout@v5.0.0 - name: Set up Python uses: actions/setup-python@v5.6.0 with: From d40d5d2b60ce3e65ed8e6c1ffa4ea70b94059dfa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 02:12:26 +0000 Subject: [PATCH 054/102] chore(deps): update all non-major dependencies --- .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 4 ++-- requirements-test.txt | 2 +- requirements.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f43bfe259..d8c32dd8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.3 + uses: codecov/codecov-action@v5.5.0 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -102,7 +102,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.4.3 + uses: codecov/codecov-action@v5.5.0 with: files: ./coverage.xml flags: unit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f492caf9..cf5dd8e24 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.76.0 + rev: 41.82.10 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 00e69a474..6d326d8bd 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -9,6 +9,6 @@ pylint==3.3.8 pytest==8.4.1 responses==0.25.8 respx==0.22.0 -types-PyYAML==6.0.12.20250809 +types-PyYAML==6.0.12.20250822 types-requests==2.32.4.20250809 -types-setuptools==80.9.0.20250809 +types-setuptools==80.9.0.20250822 diff --git a/requirements-test.txt b/requirements-test.txt index 9435bac32..36e60a2bb 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.10.0 build==1.3.0 -coverage==7.10.4 +coverage==7.10.5 pytest-console-scripts==1.4.1 pytest-cov==6.2.1 pytest-github-actions-annotate-failures==0.3.0 diff --git a/requirements.txt b/requirements.txt index 7941900de..6930e5d2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ gql==3.5.3 httpx==0.28.1 -requests==2.32.4 +requests==2.32.5 requests-toolbelt==1.0.0 From a7ef3b4b7fa65defa26db0c1a7c1de1c09965a99 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Thu, 28 Aug 2025 01:09:41 +0000 Subject: [PATCH 055/102] chore: release v6.3.0 --- gitlab/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/_version.py b/gitlab/_version.py index 2f7a85281..c9434cd63 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.2.0" +__version__ = "6.3.0" From 89cdb788feec5fb995c7de6fec6afd83844c2618 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 01:56:18 +0000 Subject: [PATCH 056/102] chore(deps): update actions/setup-python action to v6 --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/test.yml | 10 +++++----- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cb8eab5d6..40e720b4c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: Install dependencies @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: Install dependencies diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0647754dc..230894101 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v5.0.0 with: fetch-depth: 0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - run: pip install --upgrade tox diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 4da71860a..67e943bc8 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5.0.0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: install tox diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8c32dd8d..8397bf002 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,7 +50,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: ${{ matrix.python.version }} - name: Install dependencies @@ -69,7 +69,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: Install dependencies @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: Install dependencies @@ -114,7 +114,7 @@ jobs: name: Python wheel steps: - uses: actions/checkout@v5.0.0 - - uses: actions/setup-python@v5.6.0 + - uses: actions/setup-python@v6.0.0 with: python-version: "3.13" - name: Install dependencies @@ -133,7 +133,7 @@ jobs: steps: - uses: actions/checkout@v5.0.0 - name: Set up Python - uses: actions/setup-python@v5.6.0 + uses: actions/setup-python@v6.0.0 with: python-version: '3.13' - uses: actions/download-artifact@v5.0.0 From 9d4ee07c6dd81be8067893e38c2ba526f123161d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:27:58 +0000 Subject: [PATCH 057/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 4 ++-- requirements-test.txt | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdf090887..650d6a88b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.3.1 + uses: python-semantic-release/python-semantic-release@v10.4.0 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.3.1 + uses: python-semantic-release/publish-action@v10.4.0 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8397bf002..b10041f30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.1 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -102,7 +102,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.0 + uses: codecov/codecov-action@v5.5.1 with: files: ./coverage.xml flags: unit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf5dd8e24..ccca915e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.3 + rev: v4.8.4 hooks: - id: commitizen stages: [commit-msg] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.82.10 + rev: 41.97.10 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 6d326d8bd..6485cadaa 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,12 +1,12 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.8.3 +commitizen==4.8.4 flake8==7.3.0 isort==6.0.1 mypy==1.17.1 pylint==3.3.8 -pytest==8.4.1 +pytest==8.4.2 responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250822 diff --git a/requirements-test.txt b/requirements-test.txt index 36e60a2bb..a0ab0950f 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,11 +1,11 @@ -r requirements.txt anyio==4.10.0 build==1.3.0 -coverage==7.10.5 +coverage==7.10.6 pytest-console-scripts==1.4.1 -pytest-cov==6.2.1 +pytest-cov==6.3.0 pytest-github-actions-annotate-failures==0.3.0 -pytest==8.4.1 +pytest==8.4.2 PyYaml==6.0.2 responses==0.25.8 respx==0.22.0 From 99923d40dcb4f32f02bcbc5e8ef5ec4b77e3cb02 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Mon, 8 Sep 2025 18:39:02 +0200 Subject: [PATCH 058/102] feat(users): implement missing arguments in users 'list' * feat(users): sort 'user list' arguments against documentation * feat(users): implement support for 'humans' in users 'list' * feat(users): implement support for 'public_email' in users 'list' * feat(users): implement 'created_*/exclude_*/without_*' in users 'list' * feat(users): implement 'without_projects/skip_ldap/auditors' in administrators 'list' Signed-off-by: Adrian DC --- gitlab/v4/objects/users.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py index 2c2393eba..1e3941732 100644 --- a/gitlab/v4/objects/users.py +++ b/gitlab/v4/objects/users.py @@ -400,17 +400,29 @@ class UserManager(CRUDMixin[User]): _obj_cls = User _list_filters = ( + "username", + "public_email", + "search", "active", + "external", "blocked", - "username", + "humans", + "created_after", + "created_before", + "exclude_active", + "exclude_external", + "exclude_humans", + "exclude_internal", + "without_project_bots", "extern_uid", "provider", - "external", - "search", - "custom_attributes", - "status", "two_factor", + "without_projects", "admins", + "auditors", + "skip_ldap", + "custom_attributes", + "status", ) _create_attrs = RequiredOptional( optional=( From 1cc8cadc60f56eccc48c95bef2c1c62e4dca18b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 01:03:10 +0000 Subject: [PATCH 059/102] chore(deps): update actions/stale action to v10 --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0b6cbe5db..1b4e9728d 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v9.1.0 + - uses: actions/stale@v10.0.0 with: operations-per-run: 500 stale-issue-label: "stale" From 06f62a23d36a4313c7abc48daf2faaced1f2c0b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 01:38:01 +0000 Subject: [PATCH 060/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- requirements-lint.txt | 6 +++--- requirements-test.txt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 650d6a88b..2a3cc1ec7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.4.0 + uses: python-semantic-release/python-semantic-release@v10.4.1 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.4.0 + uses: python-semantic-release/publish-action@v10.4.1 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ccca915e1..67ce206ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.8.4 + rev: v4.9.1 hooks: - id: commitizen stages: [commit-msg] @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.18.1 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.97.10 + rev: 41.113.3 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 6485cadaa..697c17f54 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,14 +1,14 @@ -r requirements.txt argcomplete==2.0.0 black==25.1.0 -commitizen==4.8.4 +commitizen==4.9.1 flake8==7.3.0 isort==6.0.1 -mypy==1.17.1 +mypy==1.18.1 pylint==3.3.8 pytest==8.4.2 responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250822 -types-requests==2.32.4.20250809 +types-requests==2.32.4.20250913 types-setuptools==80.9.0.20250822 diff --git a/requirements-test.txt b/requirements-test.txt index a0ab0950f..7553600ea 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -9,5 +9,5 @@ pytest==8.4.2 PyYaml==6.0.2 responses==0.25.8 respx==0.22.0 -trio==0.30.0 +trio==0.31.0 wheel==0.45.1 From 0c565670069ac997964a34ce80fe2b7781b2d486 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 09:06:50 +0000 Subject: [PATCH 061/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 6 +++--- requirements-lint.txt | 6 +++--- requirements-test.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 67ce206ee..1eae958af 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black - rev: 25.1.0 + rev: 25.9.0 hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.1 + rev: v1.18.2 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.113.3 + rev: 41.125.3 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 697c17f54..b6d417096 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,14 +1,14 @@ -r requirements.txt argcomplete==2.0.0 -black==25.1.0 +black==25.9.0 commitizen==4.9.1 flake8==7.3.0 isort==6.0.1 -mypy==1.18.1 +mypy==1.18.2 pylint==3.3.8 pytest==8.4.2 responses==0.25.8 respx==0.22.0 -types-PyYAML==6.0.12.20250822 +types-PyYAML==6.0.12.20250915 types-requests==2.32.4.20250913 types-setuptools==80.9.0.20250822 diff --git a/requirements-test.txt b/requirements-test.txt index 7553600ea..2dc907b87 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.10.0 build==1.3.0 -coverage==7.10.6 +coverage==7.10.7 pytest-console-scripts==1.4.1 pytest-cov==6.3.0 pytest-github-actions-annotate-failures==0.3.0 From 40d8131b3bd5e42d10acb8d7d2cb178f55bae821 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sun, 28 Sep 2025 01:15:20 +0000 Subject: [PATCH 062/102] chore: release v6.4.0 --- gitlab/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/_version.py b/gitlab/_version.py index c9434cd63..88108a3fa 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.3.0" +__version__ = "6.4.0" From d878ef99f87b590eb68a06b8c49bd75c941bcfcb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 02:38:49 +0000 Subject: [PATCH 063/102] chore(deps): update all non-major dependencies --- .github/workflows/stale.yml | 2 +- .pre-commit-config.yaml | 6 +++--- requirements-docs.txt | 2 +- requirements-lint.txt | 4 ++-- requirements-test.txt | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1b4e9728d..61e7c4704 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -15,7 +15,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v10.0.0 + - uses: actions/stale@v10.1.0 with: operations-per-run: 500 stale-issue-label: "stale" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1eae958af..34887048e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,11 +16,11 @@ repos: hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 6.0.1 + rev: 6.1.0 hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v3.3.8 + rev: v3.3.9 hooks: - id: pylint additional_dependencies: @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.125.3 + rev: 41.138.1 hooks: - id: renovate-config-validator diff --git a/requirements-docs.txt b/requirements-docs.txt index 39f5f61e2..ab492bd7c 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,5 +1,5 @@ -r requirements.txt -furo==2025.7.19 +furo==2025.9.25 jinja2==3.1.6 myst-parser==4.0.1 sphinx==8.2.3 diff --git a/requirements-lint.txt b/requirements-lint.txt index b6d417096..81ca68a17 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -3,9 +3,9 @@ argcomplete==2.0.0 black==25.9.0 commitizen==4.9.1 flake8==7.3.0 -isort==6.0.1 +isort==6.1.0 mypy==1.18.2 -pylint==3.3.8 +pylint==3.3.9 pytest==8.4.2 responses==0.25.8 respx==0.22.0 diff --git a/requirements-test.txt b/requirements-test.txt index 2dc907b87..73a5ea3b4 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,12 +1,12 @@ -r requirements.txt -anyio==4.10.0 +anyio==4.11.0 build==1.3.0 coverage==7.10.7 pytest-console-scripts==1.4.1 pytest-cov==6.3.0 pytest-github-actions-annotate-failures==0.3.0 pytest==8.4.2 -PyYaml==6.0.2 +PyYaml==6.0.3 responses==0.25.8 respx==0.22.0 trio==0.31.0 From 133ba8a1f67c4c62b045c2902c4d3ae6229d93aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 03:03:01 +0000 Subject: [PATCH 064/102] chore(deps): update dependency sphinx-autobuild to v2025 --- requirements-docs.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index ab492bd7c..b83ef6dac 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -4,4 +4,4 @@ jinja2==3.1.6 myst-parser==4.0.1 sphinx==8.2.3 sphinxcontrib-autoprogram==0.1.9 -sphinx-autobuild==2024.10.3 +sphinx-autobuild==2025.8.25 From 3859aa0ff3a77b31651b770585f5cfe81c9d244a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 01:08:43 +0000 Subject: [PATCH 065/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/test.yml | 8 ++++---- .gitlab-ci.yml | 2 +- .pre-commit-config.yaml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 40e720b4c..001aca5e2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Build docs @@ -41,7 +41,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox twine wheel - name: Check twine readme rendering diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 230894101..4148fcaeb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - run: pip install --upgrade tox - name: Run commitizen (https://commitizen-tools.github.io/commitizen/) run: tox -e cz diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 67e943bc8..9bc366f6d 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v5.0.0 - uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: install tox run: pip install tox==3.26.0 - name: pre-commit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b10041f30..94dde7910 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Run tests @@ -93,7 +93,7 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: pip install tox - name: Run tests @@ -116,7 +116,7 @@ jobs: - uses: actions/checkout@v5.0.0 - uses: actions/setup-python@v6.0.0 with: - python-version: "3.13" + python-version: "3.14" - name: Install dependencies run: | pip install -r requirements-test.txt @@ -135,7 +135,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6.0.0 with: - python-version: '3.13' + python-version: '3.14' - uses: actions/download-artifact@v5.0.0 with: name: dist diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1094aa9a..8a396443b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: python:3.13 +image: python:3.14 stages: - build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34887048e..75b98ce66 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.138.1 + rev: 41.146.0 hooks: - id: renovate-config-validator From 298173017be387f26aa0828cae1e9a48e3cce328 Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Mon, 8 Sep 2025 18:39:02 +0200 Subject: [PATCH 066/102] feat(users): implement 'skip_confirmation' in users 'emails' creation Signed-off-by: Adrian DC --- gitlab/v4/objects/users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py index 1e3941732..be0e36529 100644 --- a/gitlab/v4/objects/users.py +++ b/gitlab/v4/objects/users.py @@ -502,7 +502,9 @@ class UserEmailManager( _path = "/users/{user_id}/emails" _obj_cls = UserEmail _from_parent_attrs = {"user_id": "id"} - _create_attrs = RequiredOptional(required=("email",)) + _create_attrs = RequiredOptional( + required=("email",), optional=("skip_confirmation",) + ) class UserActivities(RESTObject): From 9357a374702dcc8049a6d8af636f48c736d3f160 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 17 Oct 2025 10:30:44 -0700 Subject: [PATCH 067/102] ci(stale): fix permission for stale action and allow manual run As documented at: https://github.com/actions/stale it requires the "actions: write" permission. Also allow manually running the stale action. --- .github/workflows/stale.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 61e7c4704..e75866b21 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,10 +3,12 @@ name: 'Close stale issues and PRs' on: schedule: - cron: '30 1 * * *' + workflow_dispatch: # For manual runs permissions: issues: write pull-requests: write + actions: write concurrency: group: lock From 2982f2093aa8176865e535176cb41555e3ddbe00 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 19:33:12 +0000 Subject: [PATCH 068/102] chore(deps): update dependency pytest-cov to v7 --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 73a5ea3b4..369c95673 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -3,7 +3,7 @@ anyio==4.11.0 build==1.3.0 coverage==7.10.7 pytest-console-scripts==1.4.1 -pytest-cov==6.3.0 +pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 pytest==8.4.2 PyYaml==6.0.3 From e8d2538cdf85a7c57babbc00074efbdab97548cd Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 17 Oct 2025 13:07:33 -0700 Subject: [PATCH 069/102] feat(api): add content_ref and dry_run_ref parameters to ProjectCiLintManager Add support for the new GitLab API parameters for validating existing CI/CD configurations: - content_ref: specify the branch, tag, or SHA to validate - dry_run_ref: set branch/tag context for dry run simulations The deprecated 'ref' parameter is kept for backward compatibility. Also update documentation with examples showing how to validate CI configuration from specific branches and with dry run simulation. Fixes #3260 --- docs/gl_objects/ci_lint.rst | 12 ++++++++++++ gitlab/v4/objects/ci_lint.py | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/gl_objects/ci_lint.rst b/docs/gl_objects/ci_lint.rst index b44b09486..69a403eac 100644 --- a/docs/gl_objects/ci_lint.rst +++ b/docs/gl_objects/ci_lint.rst @@ -46,6 +46,18 @@ Lint a project's CI configuration:: assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid print(lint_result.merged_yaml) # Print the merged YAML file +Lint a project's CI configuration from a specific branch or tag:: + + lint_result = project.ci_lint.get(content_ref="main") + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid + print(lint_result.merged_yaml) # Print the merged YAML file + +Lint a project's CI configuration with dry run simulation:: + + lint_result = project.ci_lint.get(dry_run=True, dry_run_ref="develop") + assert lint_result.valid is True # Test that the .gitlab-ci.yml is valid + print(lint_result.merged_yaml) # Print the merged YAML file + Lint a CI YAML configuration with a namespace:: lint_result = project.ci_lint.create({"content": gitlab_ci_yml}) diff --git a/gitlab/v4/objects/ci_lint.py b/gitlab/v4/objects/ci_lint.py index 01d38373d..9bbe9f7e4 100644 --- a/gitlab/v4/objects/ci_lint.py +++ b/gitlab/v4/objects/ci_lint.py @@ -51,7 +51,14 @@ class ProjectCiLintManager( _path = "/projects/{project_id}/ci/lint" _obj_cls = ProjectCiLint _from_parent_attrs = {"project_id": "id"} - _optional_get_attrs = ("dry_run", "include_jobs", "ref") + _optional_get_attrs = ( + "content_ref", + "dry_run", + "dry_run_ref", + "include_jobs", + "ref", + ) + _create_attrs = RequiredOptional( required=("content",), optional=("dry_run", "include_jobs", "ref") ) From fb9693bf1e6798149196e57fed87bf2588ad3b47 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 17 Oct 2025 12:23:19 -0700 Subject: [PATCH 070/102] fix(semantic-release): enable CHANGELOG.md generation Also update CHANGELOG.md with missing entries. Exclude dependency updates from being added to the CHANGELOG.md file in the future. Closes: #3209 --- CHANGELOG.md | 162 +++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 7 +++ 2 files changed, 169 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cf99cd4..4b057cdbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,167 @@ # CHANGELOG +All versions below are listed in reverse chronological order. + +## v6.4.0 (2025-09-28) + +### Features + +- **users**: Implement missing arguments in users 'list' + ([`99923d4`](https://github.com/python-gitlab/python-gitlab/commit/99923d40dcb4f32f02bcbc5e8ef5ec4b77e3cb02)) + +- **users**: Sort 'user list' arguments against documentation + ([`99923d4`](https://github.com/python-gitlab/python-gitlab/commit/99923d40dcb4f32f02bcbc5e8ef5ec4b77e3cb02)) + + +## v6.3.0 (2025-08-28) + +### Features + +- Add sync method to force remote mirror updates + ([`f3c6678`](https://github.com/python-gitlab/python-gitlab/commit/f3c6678482b7ca35b1dd1e3bc49fc0c56cd03639)) + +- **api**: Add missing ProjectJob list filters + ([`5fe0e71`](https://github.com/python-gitlab/python-gitlab/commit/5fe0e715448b00a666f76cdce6db321686f6a271)) + +- **api**: Add missing ProjectPackageManager list filters + ([`b1696be`](https://github.com/python-gitlab/python-gitlab/commit/b1696be5fb223028755e303069e23e42a11cab42)) + +- **users**: Implement support for 'admins' in administrators 'list' + ([`aaed51c`](https://github.com/python-gitlab/python-gitlab/commit/aaed51cdec65c8acabe8b9a39fd18c7e1e48519c)) + + +## v6.2.0 (2025-07-28) + +### Build System + +- **release**: Use correct python-semantic-release/publish-action + ([`2f20634`](https://github.com/python-gitlab/python-gitlab/commit/2f20634b9700bc802177278ffdd7bdf83ef1605a)) + +### Continuous Integration + +- **stale**: Improve formatting of stale message + ([`0ef20d1`](https://github.com/python-gitlab/python-gitlab/commit/0ef20d1b0ee6cd82c4e34003aca4c0c72935f4d9)) + +- **stale**: Increase `operations-per-run` to 500 + ([`326e1a4`](https://github.com/python-gitlab/python-gitlab/commit/326e1a46881467f41dc3de5f060ac654924fbe40)) + +### Features + +- **api**: Add ListMixin to ProjectIssueDiscussionNoteManager + ([`f908f0e`](https://github.com/python-gitlab/python-gitlab/commit/f908f0e82840a5df374e8fbfb1298608d23f02bd)) + +- **api**: Add ListMixin to ProjectMergeRequestDiscussionNoteManager + ([`865339a`](https://github.com/python-gitlab/python-gitlab/commit/865339ac037fb125280180b05a2c4e44067dc5e9)) + + +## v6.1.0 (2025-06-28) + +### Chores + +- Update to mypy 1.16.0 and resolve issues found + ([`f734c58`](https://github.com/python-gitlab/python-gitlab/commit/f734c586e3fe5a0e866bcf60030107ca142fa763)) + +### Documentation + +- Update CONTRIBUTING.rst with policy on issue management + ([`45dda50`](https://github.com/python-gitlab/python-gitlab/commit/45dda50ff4c0e01307480befa86498600563f818)) + +### Features + +- **api**: Add listing user contributed projects + ([`98c1307`](https://github.com/python-gitlab/python-gitlab/commit/98c13074127ae46d85545498746d55c8b75aef48)) + +- **api**: Add support for project tag list filters + ([`378a836`](https://github.com/python-gitlab/python-gitlab/commit/378a836bf5744ca6c9409dd60899e5d2f90b55be)) + +- **api**: Pipeline inputs support + ([#3194](https://github.com/python-gitlab/python-gitlab/pull/3194), + [`306c4b1`](https://github.com/python-gitlab/python-gitlab/commit/306c4b1931e2b03d7cbcef5773668e876d5644b1)) + +- **const**: Add PLANNER_ACCESS constant + ([`ba6f174`](https://github.com/python-gitlab/python-gitlab/commit/ba6f174896f908ba711e1e3e8ebf4692c86bd3d4)) + +- **groups**: Add protectedbranches to group class + ([#3164](https://github.com/python-gitlab/python-gitlab/pull/3164), + [`bfd31a8`](https://github.com/python-gitlab/python-gitlab/commit/bfd31a867547dffb2c2d54127e184fefa058cb30)) + + +## v6.0.0 (2025-06-04) + +### Chores + +- Add reformat code commit to .git-blame-ignore-revs + ([`a6ac939`](https://github.com/python-gitlab/python-gitlab/commit/a6ac9392b0e543df32adf9058f9808d199149982)) + +- Reformat code with skip_magic_trailing_comma = true + ([`2100aa4`](https://github.com/python-gitlab/python-gitlab/commit/2100aa458ba4f1c084bc97b00f7ba1693541d68a)) + +- Remove trivial get methods in preparation for generic Get mixin + ([`edd01a5`](https://github.com/python-gitlab/python-gitlab/commit/edd01a57aa8c45e6514e618263003beaa0fb68e8)) + +- Upgrade to sphinx 8.2.1 and resolve issues + ([`d0b5ae3`](https://github.com/python-gitlab/python-gitlab/commit/d0b5ae36bd0bc06f1f338adbd93d76a83a0fa459)) + +- **ci**: Replace docs artifact with readthedocs previews + ([`193c5de`](https://github.com/python-gitlab/python-gitlab/commit/193c5de9b443193da3f87d664a777f056d920146)) + +### Documentation + +- Use get_all keyword arg instead of all in docstrings + ([`f62dda7`](https://github.com/python-gitlab/python-gitlab/commit/f62dda7fa44e3bc46f03bd6402eba3f641f365eb)) + +- Use list(get_all=True) in documentation examples + ([`f36614f`](https://github.com/python-gitlab/python-gitlab/commit/f36614f1ce5a873ed1bbb8618ced39fa80f13ee6)) + +- **api-usage**: Fix GitLab API links to the publicly accessible URLs + ([`f55fa15`](https://github.com/python-gitlab/python-gitlab/commit/f55fa152cdccc0dd4815f17df9ff80628115667d)) + +- **api-usage-graphql**: Fix the example graphql query string + ([`8dbdd7e`](https://github.com/python-gitlab/python-gitlab/commit/8dbdd7e75447d01a457ac55f18066ebd355e4dbf)) + +- **job_token_scope**: Fix typo/inconsistency + ([`203bd92`](https://github.com/python-gitlab/python-gitlab/commit/203bd92e524845a3e1287439d78c167133347a69)) + +### Features + +- Adds member role methods + ([`055557e`](https://github.com/python-gitlab/python-gitlab/commit/055557efe9de9d4ab7b8237f7de7e033a6b02cd9)) + +- **api**: Add iteration_id as boards create attribute + ([#3191](https://github.com/python-gitlab/python-gitlab/pull/3191), + [`938b0d9`](https://github.com/python-gitlab/python-gitlab/commit/938b0d9c188bcffc6759184325bf292131307556)) + +- **api**: Add support for adding instance deploy keys + ([`22be96c`](https://github.com/python-gitlab/python-gitlab/commit/22be96cbe698f5d8b18be388edf9b01d6008d1dd)) + +- **api**: Add support for avatar removal + ([`5edd2e6`](https://github.com/python-gitlab/python-gitlab/commit/5edd2e66cd5d4cd48fcf5f996d4ad4c3d495b3fa)) + +- **api**: Add support for token self-rotation + ([`da40e09`](https://github.com/python-gitlab/python-gitlab/commit/da40e09498277467878b810aa44f86b48813d832)) + +- **api**: ListMixin.list typing overload + ([`6eee494`](https://github.com/python-gitlab/python-gitlab/commit/6eee494749ccc5387a0d3af7ce331cfb1e95308b)) + +- **api**: Make RESTManager generic on RESTObject class + ([`91c4f18`](https://github.com/python-gitlab/python-gitlab/commit/91c4f18dc49a7eed101ce5f004f396436c6ef7eb)) + +- **api**: Make RESTObjectList typing generic + ([`befba35`](https://github.com/python-gitlab/python-gitlab/commit/befba35a16c5543c5f270996a9bf7a4277482915)) + +- **settings**: Implement support for 'silent_mode_enabled' + ([`a9163a9`](https://github.com/python-gitlab/python-gitlab/commit/a9163a9775b3f9a7b729048fab83bb0bca7228b5)) + +### Refactoring + +- Use more python3.9 syntax + ([`4e90c11`](https://github.com/python-gitlab/python-gitlab/commit/4e90c113f1af768b8b049f4a64c5978a1bfbf323)) + +### Testing + +- **functional**: Switch to new runner registration API + ([`cbc613d`](https://github.com/python-gitlab/python-gitlab/commit/cbc613d0f2ccd8ec021bf789b337104489a3e5f1)) + ## v5.6.0 (2025-01-28) diff --git a/pyproject.toml b/pyproject.toml index 5104c2b16..5aad28aee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,13 @@ version_variables = [ ] commit_message = "chore: release v{version}" +[tool.semantic_release.changelog] +exclude_commit_patterns = [ + '''chore\(deps\): .+''', # Exclude dependency updates from the changelog +] +mode = "update" +insertion_flag = "All versions below are listed in reverse chronological order." + [tool.pylint.messages_control] max-line-length = 88 jobs = 0 # Use auto-detected number of multiple processes to speed up Pylint. From 2acac19356c8624def90c7e54237b256bceece18 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 17 Oct 2025 10:03:07 -0700 Subject: [PATCH 071/102] docs(pull_mirror): fix incorrect start() method usage example The documentation incorrectly showed calling start() on the ProjectPullMirror object (mirror.start()), but the method only exists on the ProjectPullMirrorManager. Updated the example to show the correct usage: project.pull_mirror.start(). Fixes #3269 --- docs/gl_objects/pull_mirror.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/gl_objects/pull_mirror.rst b/docs/gl_objects/pull_mirror.rst index bc83ba36d..19e8a1946 100644 --- a/docs/gl_objects/pull_mirror.rst +++ b/docs/gl_objects/pull_mirror.rst @@ -33,6 +33,6 @@ Update an existing remote mirror's attributes:: mirror.only_protected_branches = True mirror.save() -Start an sync of the pull mirror:: +Start a sync of the pull mirror:: - mirror.start() + project.pull_mirror.start() From f78a8731a7c51b773e90276f765309324403a080 Mon Sep 17 00:00:00 2001 From: semantic-release Date: Fri, 17 Oct 2025 21:39:38 +0000 Subject: [PATCH 072/102] chore: release v6.5.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ gitlab/_version.py | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b057cdbe..f13242484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,32 @@ All versions below are listed in reverse chronological order. +## v6.5.0 (2025-10-17) + +### Bug Fixes + +- **semantic-release**: Enable CHANGELOG.md generation + ([`fb9693b`](https://github.com/python-gitlab/python-gitlab/commit/fb9693bf1e6798149196e57fed87bf2588ad3b47)) + +### Continuous Integration + +- **stale**: Fix permission for stale action and allow manual run + ([`9357a37`](https://github.com/python-gitlab/python-gitlab/commit/9357a374702dcc8049a6d8af636f48c736d3f160)) + +### Documentation + +- **pull_mirror**: Fix incorrect start() method usage example + ([`2acac19`](https://github.com/python-gitlab/python-gitlab/commit/2acac19356c8624def90c7e54237b256bceece18)) + +### Features + +- **api**: Add content_ref and dry_run_ref parameters to ProjectCiLintManager + ([`e8d2538`](https://github.com/python-gitlab/python-gitlab/commit/e8d2538cdf85a7c57babbc00074efbdab97548cd)) + +- **users**: Implement 'skip_confirmation' in users 'emails' creation + ([`2981730`](https://github.com/python-gitlab/python-gitlab/commit/298173017be387f26aa0828cae1e9a48e3cce328)) + + ## v6.4.0 (2025-09-28) ### Features diff --git a/gitlab/_version.py b/gitlab/_version.py index 88108a3fa..5c642f8f0 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.4.0" +__version__ = "6.5.0" From 0a6c4085e75e02c715f9132d81a00e2be7df9267 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 02:43:25 +0000 Subject: [PATCH 073/102] chore(deps): update dependency pylint to v4 --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 81ca68a17..67fcbb647 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -5,7 +5,7 @@ commitizen==4.9.1 flake8==7.3.0 isort==6.1.0 mypy==1.18.2 -pylint==3.3.9 +pylint==4.0.1 pytest==8.4.2 responses==0.25.8 respx==0.22.0 From 2e0831c7b88ec98b3ef1cab944f1aba77b31fcc7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 03:01:55 +0000 Subject: [PATCH 074/102] chore(deps): update dependency isort to v7 --- requirements-lint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 67fcbb647..b956034b6 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -3,7 +3,7 @@ argcomplete==2.0.0 black==25.9.0 commitizen==4.9.1 flake8==7.3.0 -isort==6.1.0 +isort==7.0.0 mypy==1.18.2 pylint==4.0.1 pytest==8.4.2 From d623085b39c05be14f3e136730d8d617fb961c46 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 04:11:53 +0000 Subject: [PATCH 075/102] chore(deps): update pre-commit hook pycqa/isort to v7 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75b98ce66..fd18f39d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 6.1.0 + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/pycqa/pylint From e213849bef447b94f2185f5c5e2bb3cbdef0a0f6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 04:30:54 +0000 Subject: [PATCH 076/102] chore(deps): update pre-commit hook pycqa/pylint to v4 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd18f39d1..364d107a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v3.3.9 + rev: v4.0.1 hooks: - id: pylint additional_dependencies: From 0f5655c7c018223b325d3ebc42029d92bac449c1 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Sun, 19 Oct 2025 22:27:41 -0700 Subject: [PATCH 077/102] chore(deps): upgrade coverage to 7.11.0 for Python > 3.9 For Python versions newer than 3.9 use 'coverage==7.11.0' For 3.9 and older continue to use 'coverage==7.10.7' --- requirements-test.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 369c95673..8be29d41c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,8 @@ -r requirements.txt anyio==4.11.0 build==1.3.0 -coverage==7.10.7 +coverage==7.10.7 ; python_version <= '3.9' +coverage==7.11.0 ; python_version > '3.9' pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 From adbc833b982c3328a47d618bd0e61e4bb068e0ba Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 00:40:38 +0000 Subject: [PATCH 078/102] chore(deps): update github artifact actions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94dde7910..baf3f5262 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,7 +122,7 @@ jobs: pip install -r requirements-test.txt - name: Build package run: python -m build -o dist/ - - uses: actions/upload-artifact@v4.6.2 + - uses: actions/upload-artifact@v5.0.0 with: name: dist path: dist @@ -136,7 +136,7 @@ jobs: uses: actions/setup-python@v6.0.0 with: python-version: '3.14' - - uses: actions/download-artifact@v5.0.0 + - uses: actions/download-artifact@v6.0.0 with: name: dist path: dist From 22941acc3f331d5b683599c014ec962ece5d4b76 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 29 Oct 2025 07:18:00 -0700 Subject: [PATCH 079/102] feat!: drop Python 3.9 support and add Python 3.14 Python 3.9 is End-of-Life (EOL) as of 2025-10 as stated in https://devguide.python.org/versions/ and https://peps.python.org/pep-0596/#lifespan By dropping support for Python 3.9 and requiring Python 3.10 or higher it allows python-gitlab to take advantage of new features in Python 3.10, which are documented at: https://docs.python.org/3/whatsnew/3.10.html Also mark Python 3.14 as officially supported as it has been released. Closes: https://github.com/python-gitlab/python-gitlab/issues/3285 BREAKING CHANGE: As of python-gitlab 7.0.0, Python 3.9 is no longer supported. Python 3.10 or higher is required. --- .github/workflows/test.yml | 12 +++++------- .readthedocs.yml | 2 +- README.rst | 2 +- pyproject.toml | 4 ++-- requirements-test.txt | 3 +-- tox.ini | 4 ++-- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baf3f5262..7f1b877ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,8 +26,6 @@ jobs: matrix: os: [ubuntu-latest] python: - - version: "3.9" - toxenv: py39,smoke - version: "3.10" toxenv: py310,smoke - version: "3.11" @@ -36,17 +34,17 @@ jobs: toxenv: py312,smoke - version: "3.13" toxenv: py313,smoke - - version: "3.14.0-alpha - 3.14" # SemVer's version range syntax + - version: "3.14" toxenv: py314,smoke include: - os: macos-latest python: - version: "3.13" - toxenv: py313,smoke + version: "3.14" + toxenv: py314,smoke - os: windows-latest python: - version: "3.13" - toxenv: py313,smoke + version: "3.14" + toxenv: py314,smoke steps: - uses: actions/checkout@v5.0.0 - name: Set up Python ${{ matrix.python.version }} diff --git a/.readthedocs.yml b/.readthedocs.yml index 2d561b88b..facdbd3f9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.13" sphinx: configuration: docs/conf.py diff --git a/README.rst b/README.rst index 101add1eb..1b7b7ce48 100644 --- a/README.rst +++ b/README.rst @@ -53,7 +53,7 @@ Features Installation ------------ -As of 5.0.0, ``python-gitlab`` is compatible with Python 3.9+. +As of 7.0.0, ``python-gitlab`` is compatible with Python 3.10+. Use ``pip`` to install the latest stable version of ``python-gitlab``: diff --git a/pyproject.toml b/pyproject.toml index 5aad28aee..7b8510b94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ maintainers = [ {name = "Nejc Habjan", email="nejc.habjan@siemens.com"}, {name = "Roger Meier", email="r.meier@siemens.com"} ] -requires-python = ">=3.9.0" +requires-python = ">=3.10.0" dependencies = [ "requests>=2.32.0", "requests-toolbelt>=1.0.0", @@ -30,11 +30,11 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] keywords = ["api", "client", "gitlab", "python", "python-gitlab", "wrapper"] license = {text = "LGPL-3.0-or-later"} diff --git a/requirements-test.txt b/requirements-test.txt index 8be29d41c..64b22c3af 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,8 +1,7 @@ -r requirements.txt anyio==4.11.0 build==1.3.0 -coverage==7.10.7 ; python_version <= '3.9' -coverage==7.11.0 ; python_version > '3.9' +coverage==7.11.0 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 diff --git a/tox.ini b/tox.ini index 05a15c6c4..0ba295692 100644 --- a/tox.ini +++ b/tox.ini @@ -2,14 +2,14 @@ minversion = 4.0 skipsdist = True skip_missing_interpreters = True -envlist = py313,py312,py311,py310,py39,black,isort,flake8,mypy,twine-check,cz,pylint +envlist = py314,py313,py312,py311,py310,black,isort,flake8,mypy,twine-check,cz,pylint # NOTE(jlvillal): To use a label use the `-m` flag. # For example to run the `func` label group of environments do: # tox -m func labels = lint = black,isort,flake8,mypy,pylint,cz - unit = py313,py312,py311,py310,py39,py38 + unit = py314,py313,py312,py311,py310 # func is the functional tests. This is very time consuming. func = cli_func_v4,api_func_v4 From 378b72d841b5c7ff34eb7b9d8b4c3083af367a4c Mon Sep 17 00:00:00 2001 From: semantic-release Date: Wed, 29 Oct 2025 15:05:36 +0000 Subject: [PATCH 080/102] chore: release v7.0.0 --- CHANGELOG.md | 12 ++++++++++++ gitlab/_version.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f13242484..de7c0d113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All versions below are listed in reverse chronological order. +## v7.0.0 (2025-10-29) + +### Features + +- Drop Python 3.9 support and add Python 3.14 + ([`22941ac`](https://github.com/python-gitlab/python-gitlab/commit/22941acc3f331d5b683599c014ec962ece5d4b76)) + +### Breaking Changes + +- As of python-gitlab 7.0.0, Python 3.9 is no longer supported. Python 3.10 or higher is required. + + ## v6.5.0 (2025-10-17) ### Bug Fixes diff --git a/gitlab/_version.py b/gitlab/_version.py index 5c642f8f0..e7817062d 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "6.5.0" +__version__ = "7.0.0" From c7333d8520a6eb0b68caf1acbadd715f6dd7dcda Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:51:20 +0000 Subject: [PATCH 081/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 364d107a7..684696497 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v4.0.1 + rev: v4.0.2 hooks: - id: pylint additional_dependencies: @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.146.0 + rev: 41.165.3 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index b956034b6..3cffe0d99 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -5,7 +5,7 @@ commitizen==4.9.1 flake8==7.3.0 isort==7.0.0 mypy==1.18.2 -pylint==4.0.1 +pylint==4.0.2 pytest==8.4.2 responses==0.25.8 respx==0.22.0 From 614a74c00f027f70b8e48a6b2a2ddcd3f823bffa Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 29 Oct 2025 08:41:03 -0700 Subject: [PATCH 082/102] ci(release): use the correct token for publish to GitHub For the: "Publish package distributions to GitHub Releases" use the correct `secrets.RELEASE_GITHUB_TOKEN`. Before it was using `secrets.GITHUB_TOKEN` The other steps are already using `secrets.RELEASE_GITHUB_TOKEN` Closes: https://github.com/python-gitlab/python-gitlab/issues/3288 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a3cc1ec7..996c096ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,4 +35,4 @@ jobs: uses: python-semantic-release/publish-action@v10.4.1 if: steps.release.outputs.released == 'true' with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} From b70a2eb9ff5195f123c41cf1d631ff151ce089f1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 18:04:51 +0000 Subject: [PATCH 083/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 684696497..963fecc3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.165.3 + rev: 41.169.2 hooks: - id: renovate-config-validator diff --git a/requirements-test.txt b/requirements-test.txt index 64b22c3af..da7703a8b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -9,5 +9,5 @@ pytest==8.4.2 PyYaml==6.0.3 responses==0.25.8 respx==0.22.0 -trio==0.31.0 +trio==0.32.0 wheel==0.45.1 From 1e025b91d3025a214bb681964bc91a53bfb10752 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 03:07:56 +0000 Subject: [PATCH 084/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 2 +- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 2 +- requirements-precommit.txt | 2 +- requirements-test.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 996c096ea..0699b6885 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.4.1 + uses: python-semantic-release/python-semantic-release@v10.5.0 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 963fecc3b..b2e6bf30d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black - rev: 25.9.0 + rev: 25.11.0 hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.169.2 + rev: 41.173.1 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 3cffe0d99..427e28e23 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,6 +1,6 @@ -r requirements.txt argcomplete==2.0.0 -black==25.9.0 +black==25.11.0 commitizen==4.9.1 flake8==7.3.0 isort==7.0.0 diff --git a/requirements-precommit.txt b/requirements-precommit.txt index 3ee862221..b6927360e 100644 --- a/requirements-precommit.txt +++ b/requirements-precommit.txt @@ -1 +1 @@ -pre-commit==4.3.0 +pre-commit==4.4.0 diff --git a/requirements-test.txt b/requirements-test.txt index da7703a8b..72bc4db00 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.11.0 build==1.3.0 -coverage==7.11.0 +coverage==7.11.3 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 From 54471d2088b3b1b8442fe7fd88981d188d9fed13 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 02:08:47 +0000 Subject: [PATCH 085/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- requirements-docker.txt | 2 +- requirements-lint.txt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0699b6885..3b9630fd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.5.0 + uses: python-semantic-release/python-semantic-release@v10.5.2 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.4.1 + uses: python-semantic-release/publish-action@v10.5.2 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2e6bf30d..9a2ad6138 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.9.1 + rev: v4.10.0 hooks: - id: commitizen stages: [commit-msg] @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v4.0.2 + rev: v4.0.3 hooks: - id: pylint additional_dependencies: diff --git a/requirements-docker.txt b/requirements-docker.txt index 532609b3f..123a4438a 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -1,3 +1,3 @@ -r requirements.txt -r requirements-test.txt -pytest-docker==3.2.3 +pytest-docker==3.2.5 diff --git a/requirements-lint.txt b/requirements-lint.txt index 427e28e23..4b3722256 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,11 +1,11 @@ -r requirements.txt argcomplete==2.0.0 black==25.11.0 -commitizen==4.9.1 +commitizen==4.10.0 flake8==7.3.0 isort==7.0.0 mypy==1.18.2 -pylint==4.0.2 +pylint==4.0.3 pytest==8.4.2 responses==0.25.8 respx==0.22.0 From 87513eaf9a49bcd12e7d3a1ca441727886846c29 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 03:01:59 +0000 Subject: [PATCH 086/102] chore(deps): update dependency pytest to v9 --- requirements-lint.txt | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-lint.txt b/requirements-lint.txt index 4b3722256..241dd9042 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -6,7 +6,7 @@ flake8==7.3.0 isort==7.0.0 mypy==1.18.2 pylint==4.0.3 -pytest==8.4.2 +pytest==9.0.1 responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250915 diff --git a/requirements-test.txt b/requirements-test.txt index 72bc4db00..5271bfa51 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,7 +5,7 @@ coverage==7.11.3 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 -pytest==8.4.2 +pytest==9.0.1 PyYaml==6.0.3 responses==0.25.8 respx==0.22.0 From 3449af7c6f26a2df8048d88e5977a198e05c3a95 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 03:28:19 +0000 Subject: [PATCH 087/102] chore(deps): update pre-commit hook maxbrunet/pre-commit-renovate to v42 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9a2ad6138..5a6adb1be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 41.173.1 + rev: 42.11.0 hooks: - id: renovate-config-validator From 595da41c9662e98bb8f048a9e0aaa03335b50104 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 01:50:32 +0000 Subject: [PATCH 088/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 10 +++++----- .pre-commit-config.yaml | 2 +- requirements-precommit.txt | 2 +- requirements-test.txt | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 001aca5e2..d6bfe26ce 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python uses: actions/setup-python@v6.0.0 with: @@ -37,7 +37,7 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python uses: actions/setup-python@v6.0.0 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4148fcaeb..c097b8d30 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 with: fetch-depth: 0 - uses: actions/setup-python@v6.0.0 diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 9bc366f6d..52b5fba96 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,7 +29,7 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - uses: actions/setup-python@v6.0.0 with: python-version: "3.14" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b9630fd9..7b219c218 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f1b877ca..2ae02db98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: version: "3.14" toxenv: py314,smoke steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v6.0.0 with: @@ -65,7 +65,7 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python uses: actions/setup-python@v6.0.0 with: @@ -87,7 +87,7 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.0.0 with: @@ -111,7 +111,7 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - uses: actions/setup-python@v6.0.0 with: python-version: "3.14" @@ -129,7 +129,7 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v5.0.0 + - uses: actions/checkout@v5.0.1 - name: Set up Python uses: actions/setup-python@v6.0.0 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a6adb1be..2fca6428d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.11.0 + rev: 42.19.3 hooks: - id: renovate-config-validator diff --git a/requirements-precommit.txt b/requirements-precommit.txt index b6927360e..917f1957e 100644 --- a/requirements-precommit.txt +++ b/requirements-precommit.txt @@ -1 +1 @@ -pre-commit==4.4.0 +pre-commit==4.5.0 diff --git a/requirements-test.txt b/requirements-test.txt index 5271bfa51..2bd17b92e 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.11.0 build==1.3.0 -coverage==7.11.3 +coverage==7.12.0 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 From d071dcfaf2a0de37dd3044c4c8bf4ff3ee1d90f5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 02:56:33 +0000 Subject: [PATCH 089/102] chore(deps): update actions/checkout action to v6 --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d6bfe26ce..d9eba338d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python uses: actions/setup-python@v6.0.0 with: @@ -37,7 +37,7 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python uses: actions/setup-python@v6.0.0 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c097b8d30..30dc1e6ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 with: fetch-depth: 0 - uses: actions/setup-python@v6.0.0 diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 52b5fba96..bf29fd478 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,7 +29,7 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - uses: actions/setup-python@v6.0.0 with: python-version: "3.14" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b219c218..413bdae23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ae02db98..78ebbd626 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: version: "3.14" toxenv: py314,smoke steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v6.0.0 with: @@ -65,7 +65,7 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python uses: actions/setup-python@v6.0.0 with: @@ -87,7 +87,7 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.0.0 with: @@ -111,7 +111,7 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - uses: actions/setup-python@v6.0.0 with: python-version: "3.14" @@ -129,7 +129,7 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v5.0.1 + - uses: actions/checkout@v6.0.0 - name: Set up Python uses: actions/setup-python@v6.0.0 with: From 16fa4b8e648d2fcdf98fabd8d6cd565ce14a3155 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 02:01:29 +0000 Subject: [PATCH 090/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/test.yml | 10 +++++----- .pre-commit-config.yaml | 6 +++--- requirements-lint.txt | 4 ++-- requirements-test.txt | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d9eba338d..696abe747 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: Install dependencies @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: Install dependencies diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 30dc1e6ce..aa022f474 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v6.0.0 with: fetch-depth: 0 - - uses: actions/setup-python@v6.0.0 + - uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - run: pip install --upgrade tox diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index bf29fd478..ad22f2a6e 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6.0.0 - - uses: actions/setup-python@v6.0.0 + - uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: install tox diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78ebbd626..58b843c77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python ${{ matrix.python.version }} - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: ${{ matrix.python.version }} - name: Install dependencies @@ -67,7 +67,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: Install dependencies @@ -89,7 +89,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: Install dependencies @@ -112,7 +112,7 @@ jobs: name: Python wheel steps: - uses: actions/checkout@v6.0.0 - - uses: actions/setup-python@v6.0.0 + - uses: actions/setup-python@v6.1.0 with: python-version: "3.14" - name: Install dependencies @@ -131,7 +131,7 @@ jobs: steps: - uses: actions/checkout@v6.0.0 - name: Set up Python - uses: actions/setup-python@v6.0.0 + uses: actions/setup-python@v6.1.0 with: python-version: '3.14' - uses: actions/download-artifact@v6.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fca6428d..08ddcb73a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: hooks: - id: isort - repo: https://github.com/pycqa/pylint - rev: v4.0.3 + rev: v4.0.4 hooks: - id: pylint additional_dependencies: @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.18.2 + rev: v1.19.0 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.19.3 + rev: 42.27.0 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 241dd9042..bcf13fe69 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -4,8 +4,8 @@ black==25.11.0 commitizen==4.10.0 flake8==7.3.0 isort==7.0.0 -mypy==1.18.2 -pylint==4.0.3 +mypy==1.19.0 +pylint==4.0.4 pytest==9.0.1 responses==0.25.8 respx==0.22.0 diff --git a/requirements-test.txt b/requirements-test.txt index 2bd17b92e..c42011354 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,5 +1,5 @@ -r requirements.txt -anyio==4.11.0 +anyio==4.12.0 build==1.3.0 coverage==7.12.0 pytest-console-scripts==1.4.1 From 9f11323c60468d8fdccb4b08aac857f9c485f9d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 08:39:41 +0000 Subject: [PATCH 091/102] chore(deps): update all non-major dependencies --- .github/workflows/docs.yml | 4 ++-- .github/workflows/lint.yml | 2 +- .github/workflows/pre_commit.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/stale.yml | 2 +- .github/workflows/test.yml | 10 +++++----- .pre-commit-config.yaml | 4 ++-- requirements-lint.txt | 4 ++-- requirements-test.txt | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 696abe747..90f7d3fd5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: sphinx: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python uses: actions/setup-python@v6.1.0 with: @@ -37,7 +37,7 @@ jobs: twine-check: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python uses: actions/setup-python@v6.1.0 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aa022f474..01bee8a33 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,7 +22,7 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 with: fetch-depth: 0 - uses: actions/setup-python@v6.1.0 diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index ad22f2a6e..4be228d66 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -29,7 +29,7 @@ jobs: pre_commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - uses: actions/setup-python@v6.1.0 with: python-version: "3.14" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 413bdae23..c48d32445 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: id-token: write environment: pypi.org steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 with: fetch-depth: 0 token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e75866b21..e4fd014a5 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -17,7 +17,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v10.1.0 + - uses: actions/stale@v10.1.1 with: operations-per-run: 500 stale-issue-label: "stale" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58b843c77..b10f50c21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: version: "3.14" toxenv: py314,smoke steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python ${{ matrix.python.version }} uses: actions/setup-python@v6.1.0 with: @@ -65,7 +65,7 @@ jobs: matrix: toxenv: [api_func_v4, cli_func_v4] steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python uses: actions/setup-python@v6.1.0 with: @@ -87,7 +87,7 @@ jobs: coverage: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6.1.0 with: @@ -111,7 +111,7 @@ jobs: runs-on: ubuntu-latest name: Python wheel steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - uses: actions/setup-python@v6.1.0 with: python-version: "3.14" @@ -129,7 +129,7 @@ jobs: runs-on: ubuntu-latest needs: [dist] steps: - - uses: actions/checkout@v6.0.0 + - uses: actions/checkout@v6.0.1 - name: Set up Python uses: actions/setup-python@v6.1.0 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 08ddcb73a..c9e61446b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/psf/black - rev: 25.11.0 + rev: 25.12.0 hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.27.0 + rev: 42.39.4 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index bcf13fe69..4eb6779f8 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,12 +1,12 @@ -r requirements.txt argcomplete==2.0.0 -black==25.11.0 +black==25.12.0 commitizen==4.10.0 flake8==7.3.0 isort==7.0.0 mypy==1.19.0 pylint==4.0.4 -pytest==9.0.1 +pytest==9.0.2 responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250915 diff --git a/requirements-test.txt b/requirements-test.txt index c42011354..e8843be94 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -5,7 +5,7 @@ coverage==7.12.0 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 -pytest==9.0.1 +pytest==9.0.2 PyYaml==6.0.3 responses==0.25.8 respx==0.22.0 From 422119576287de30e1b70411c7ab0bbe39231af7 Mon Sep 17 00:00:00 2001 From: Alexandre Laroche Date: Thu, 4 Dec 2025 06:01:29 -0500 Subject: [PATCH 092/102] fix(utils): prevent negative sleep time in rate limit retry --- gitlab/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/utils.py b/gitlab/utils.py index bf37e09a5..cf1b5b7b0 100644 --- a/gitlab/utils.py +++ b/gitlab/utils.py @@ -133,7 +133,7 @@ def handle_retry_on_status( if "Retry-After" in headers: wait_time = int(headers["Retry-After"]) elif "RateLimit-Reset" in headers: - wait_time = int(headers["RateLimit-Reset"]) - time.time() + wait_time = max(0, int(headers["RateLimit-Reset"]) - time.time()) self.cur_retries += 1 time.sleep(wait_time) return True From 3c72fd1e0d74ebd82c257ba1b810252c5a7295f7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 18:42:30 +0000 Subject: [PATCH 093/102] chore(deps): update all non-major dependencies --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- .pre-commit-config.yaml | 6 +++--- requirements-lint.txt | 4 ++-- requirements-precommit.txt | 2 +- requirements-test.txt | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c48d32445..ff04716dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Python Semantic Release id: release - uses: python-semantic-release/python-semantic-release@v10.5.2 + uses: python-semantic-release/python-semantic-release@v10.5.3 with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} @@ -32,7 +32,7 @@ jobs: if: steps.release.outputs.released == 'true' - name: Publish package distributions to GitHub Releases - uses: python-semantic-release/publish-action@v10.5.2 + uses: python-semantic-release/publish-action@v10.5.3 if: steps.release.outputs.released == 'true' with: github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b10f50c21..eec3e1599 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,7 +77,7 @@ jobs: TOXENV: ${{ matrix.toxenv }} run: tox -- --override-ini='log_cli=True' - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.1 + uses: codecov/codecov-action@v5.5.2 with: files: ./coverage.xml flags: ${{ matrix.toxenv }} @@ -100,7 +100,7 @@ jobs: TOXENV: cover run: tox - name: Upload codecov coverage - uses: codecov/codecov-action@v5.5.1 + uses: codecov/codecov-action@v5.5.2 with: files: ./coverage.xml flags: unit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9e61446b..41e732604 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: hooks: - id: black - repo: https://github.com/commitizen-tools/commitizen - rev: v4.10.0 + rev: v4.10.1 hooks: - id: commitizen stages: [commit-msg] @@ -32,7 +32,7 @@ repos: - requests-toolbelt==1.0.0 files: 'gitlab/' - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.19.0 + rev: v1.19.1 hooks: - id: mypy args: [] @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.39.4 + rev: 42.64.0 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 4eb6779f8..31ec607b9 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,10 +1,10 @@ -r requirements.txt argcomplete==2.0.0 black==25.12.0 -commitizen==4.10.0 +commitizen==4.10.1 flake8==7.3.0 isort==7.0.0 -mypy==1.19.0 +mypy==1.19.1 pylint==4.0.4 pytest==9.0.2 responses==0.25.8 diff --git a/requirements-precommit.txt b/requirements-precommit.txt index 917f1957e..fc2379223 100644 --- a/requirements-precommit.txt +++ b/requirements-precommit.txt @@ -1 +1 @@ -pre-commit==4.5.0 +pre-commit==4.5.1 diff --git a/requirements-test.txt b/requirements-test.txt index e8843be94..b06434452 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.12.0 build==1.3.0 -coverage==7.12.0 +coverage==7.13.0 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 From 91793733df8de2bd371e2297c80b429a2fcaace1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:00:55 +0000 Subject: [PATCH 094/102] chore(deps): update dessant/lock-threads action to v6 --- .github/workflows/lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 05e21065c..f6f1c6229 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,6 +15,6 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v5.0.1 + - uses: dessant/lock-threads@v6.0.0 with: process-only: 'issues' From 40827f419020d84aa777fa42a289fb07dc2b3fa7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 00:30:50 +0000 Subject: [PATCH 095/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-docs.txt | 2 +- requirements-lint.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41e732604..3b93e8655 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.64.0 + rev: 42.64.1 hooks: - id: renovate-config-validator diff --git a/requirements-docs.txt b/requirements-docs.txt index b83ef6dac..8d756d4f1 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,5 +1,5 @@ -r requirements.txt -furo==2025.9.25 +furo==2025.12.19 jinja2==3.1.6 myst-parser==4.0.1 sphinx==8.2.3 diff --git a/requirements-lint.txt b/requirements-lint.txt index 31ec607b9..5006460d1 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -11,4 +11,4 @@ responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250915 types-requests==2.32.4.20250913 -types-setuptools==80.9.0.20250822 +types-setuptools==80.9.0.20251221 From c7c139b9e7823ec1800a819233aee469355ee8d1 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Wed, 24 Dec 2025 13:17:55 -0800 Subject: [PATCH 096/102] test(functional): update to GitLab 18.6 and resolve issues found --- tests/functional/api/test_epics.py | 8 ++++--- tests/functional/api/test_keys.py | 10 ++++++++- .../api/test_project_job_token_scope.py | 4 ++++ tests/functional/api/test_projects.py | 4 ++-- tests/functional/fixtures/.env | 2 +- tests/functional/fixtures/docker-compose.yml | 2 +- tests/functional/helpers.py | 22 +++++++++---------- 7 files changed, 33 insertions(+), 19 deletions(-) diff --git a/tests/functional/api/test_epics.py b/tests/functional/api/test_epics.py index a4f6765da..b61e23776 100644 --- a/tests/functional/api/test_epics.py +++ b/tests/functional/api/test_epics.py @@ -15,18 +15,20 @@ def test_epics(group): assert group.epics.list() -@pytest.mark.xfail(reason="404 on issue.id") def test_epic_issues(epic, issue): assert not epic.issues.list() + # FYI: Creating an issue causes a note to be created epic_issue = epic.issues.create({"issue_id": issue.id}) assert epic.issues.list() + # FYI: Deleting an issue causes a note to be created epic_issue.delete() def test_epic_notes(epic): - assert not epic.notes.list() + notes = epic.notes.list(get_all=True) epic.notes.create({"body": "Test note"}) - assert epic.notes.list() + new_notes = epic.notes.list(get_all=True) + assert len(new_notes) == (len(notes) + 1), f"{new_notes} {notes}" diff --git a/tests/functional/api/test_keys.py b/tests/functional/api/test_keys.py index 359649bef..6a2d660ed 100644 --- a/tests/functional/api/test_keys.py +++ b/tests/functional/api/test_keys.py @@ -38,6 +38,14 @@ def test_keys_deploy(gl, project, DEPLOY_KEY): key_by_fingerprint = gl.keys.get(fingerprint=fingerprint) assert key_by_fingerprint.title == key.title assert key_by_fingerprint.key == key.key - assert len(key_by_fingerprint.deploy_keys_projects) == 1 + + if not any( + key_project.get("project_id") == project.id + for key_project in key_by_fingerprint.deploy_keys_projects + ): + raise AssertionError( + f"Project {project} not found in 'deploy_keys_projects' " + f"{key_by_fingerprint.pformat()}" + ) key.delete() diff --git a/tests/functional/api/test_project_job_token_scope.py b/tests/functional/api/test_project_job_token_scope.py index 0d0466182..b1de0a7b2 100644 --- a/tests/functional/api/test_project_job_token_scope.py +++ b/tests/functional/api/test_project_job_token_scope.py @@ -1,3 +1,6 @@ +import pytest + + # https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html#allow-any-project-to-access-your-project def test_enable_limit_access_to_this_project(gl, project): scope = project.job_token_scope.get() @@ -10,6 +13,7 @@ def test_enable_limit_access_to_this_project(gl, project): assert scope.inbound_enabled +@pytest.mark.xfail(reason="https://gitlab.com/gitlab-org/gitlab/-/issues/582271") def test_disable_limit_access_to_this_project(gl, project): scope = project.job_token_scope.get() diff --git a/tests/functional/api/test_projects.py b/tests/functional/api/test_projects.py index 760f95336..c56b23ec7 100644 --- a/tests/functional/api/test_projects.py +++ b/tests/functional/api/test_projects.py @@ -26,9 +26,9 @@ def test_create_project(gl, user): sudo_project = gl.projects.create({"name": "sudo_project"}, sudo=user.id) - created = gl.projects.list() + created = gl.projects.list(get_all=True) created_gen = gl.projects.list(iterator=True) - owned = gl.projects.list(owned=True) + owned = gl.projects.list(owned=True, get_all=True) assert admin_project in created and sudo_project in created assert admin_project in owned and sudo_project not in owned diff --git a/tests/functional/fixtures/.env b/tests/functional/fixtures/.env index e85f85e6f..a96b42f42 100644 --- a/tests/functional/fixtures/.env +++ b/tests/functional/fixtures/.env @@ -1,4 +1,4 @@ GITLAB_IMAGE=gitlab/gitlab-ee -GITLAB_TAG=17.8.2-ee.0 +GITLAB_TAG=18.6.1-ee.0 GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner GITLAB_RUNNER_TAG=96856197 diff --git a/tests/functional/fixtures/docker-compose.yml b/tests/functional/fixtures/docker-compose.yml index f36f3d2fd..17562d5be 100644 --- a/tests/functional/fixtures/docker-compose.yml +++ b/tests/functional/fixtures/docker-compose.yml @@ -34,7 +34,7 @@ services: entrypoint: - /bin/sh - -c - - ruby /create_license.rb && /assets/wrapper + - ruby /create_license.rb && /assets/init-container volumes: - ${PWD}/tests/functional/fixtures/create_license.rb:/create_license.rb ports: diff --git a/tests/functional/helpers.py b/tests/functional/helpers.py index 090673bf7..9d313e540 100644 --- a/tests/functional/helpers.py +++ b/tests/functional/helpers.py @@ -9,6 +9,7 @@ import gitlab import gitlab.base import gitlab.exceptions +import gitlab.v4.objects SLEEP_INTERVAL = 0.5 TIMEOUT = 60 # seconds before timeout will occur @@ -37,6 +38,11 @@ def safe_delete(object: gitlab.base.RESTObject) -> None: object = manager.get(object.get_id()) # type: ignore[attr-defined] except gitlab.exceptions.GitlabGetError: return + # If object is already marked for deletion we have succeeded + if getattr(object, "marked_for_deletion_on", None) is not None: + # 'Group' and 'Project' objects have a 'marked_for_deletion_on' attribute + logging.info(f"{object!r} is marked for deletion.") + return if index: logging.info(f"Attempt {index + 1} to delete {object!r}.") @@ -52,22 +58,16 @@ def safe_delete(object: gitlab.base.RESTObject) -> None: # we shouldn't cause test to fail if it still exists return elif isinstance(object, gitlab.v4.objects.Project): - # Immediately delete rather than waiting for at least 1day - # https://docs.gitlab.com/ee/api/projects.html#delete-project - object.delete(permanently_remove=True) - pass + # Starting in GitLab 18, projects can't be immediately deleted. + # So this will mark it for deletion. + object.delete() else: # We only attempt to delete parent groups to prevent dangling sub-groups - # However parent groups can only be deleted on a delay in Gl 16 + # However parent groups can only be deleted on a delay in GitLab 16 # https://docs.gitlab.com/ee/api/groups.html#remove-group object.delete() except gitlab.exceptions.GitlabDeleteError: - logging.info(f"{object!r} already deleted or scheduled for deletion.") - if isinstance(object, gitlab.v4.objects.Group): - # Parent groups can never be immediately deleted in GL 16, - # so don't cause test to fail if it still exists - return - pass + logging.exception(f"Error attempting to delete: {object.pformat()}") time.sleep(SLEEP_INTERVAL) pytest.fail(f"{object!r} was not deleted") From d6eac7bea8d755dbe11ef4ff8a5247aa1aba2e24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Dec 2025 21:54:12 +0000 Subject: [PATCH 097/102] chore(deps): update gitlab/gitlab-ee docker tag to v18.7.0-ee.0 (#3218) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tests/functional/fixtures/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/fixtures/.env b/tests/functional/fixtures/.env index a96b42f42..f33c35752 100644 --- a/tests/functional/fixtures/.env +++ b/tests/functional/fixtures/.env @@ -1,4 +1,4 @@ GITLAB_IMAGE=gitlab/gitlab-ee -GITLAB_TAG=18.6.1-ee.0 +GITLAB_TAG=18.7.0-ee.0 GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner GITLAB_RUNNER_TAG=96856197 From 9dd62c3f5bcf3e082c2733bd4edc068f993c22ec Mon Sep 17 00:00:00 2001 From: Sigurd Spieckermann Date: Thu, 20 Nov 2025 12:58:50 +0100 Subject: [PATCH 098/102] feat(registry-protection): add support for registry protection rule deletion --- .../registry_protection_repository_rules.py | 10 +++++++++- tests/functional/api/test_registry.py | 5 +++++ .../objects/test_registry_protection_rules.py | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/gitlab/v4/objects/registry_protection_repository_rules.py b/gitlab/v4/objects/registry_protection_repository_rules.py index 19d4bdf59..2a457a024 100644 --- a/gitlab/v4/objects/registry_protection_repository_rules.py +++ b/gitlab/v4/objects/registry_protection_repository_rules.py @@ -1,5 +1,12 @@ from gitlab.base import RESTObject -from gitlab.mixins import CreateMixin, ListMixin, SaveMixin, UpdateMethod, UpdateMixin +from gitlab.mixins import ( + CreateMixin, + DeleteMixin, + ListMixin, + SaveMixin, + UpdateMethod, + UpdateMixin, +) from gitlab.types import RequiredOptional __all__ = [ @@ -16,6 +23,7 @@ class ProjectRegistryRepositoryProtectionRuleManager( ListMixin[ProjectRegistryRepositoryProtectionRule], CreateMixin[ProjectRegistryRepositoryProtectionRule], UpdateMixin[ProjectRegistryRepositoryProtectionRule], + DeleteMixin[ProjectRegistryRepositoryProtectionRule], ): _path = "/projects/{project_id}/registry/protection/repository/rules" _obj_cls = ProjectRegistryRepositoryProtectionRule diff --git a/tests/functional/api/test_registry.py b/tests/functional/api/test_registry.py index 91fdceacc..d234128ca 100644 --- a/tests/functional/api/test_registry.py +++ b/tests/functional/api/test_registry.py @@ -26,3 +26,8 @@ def test_project_protected_registry(project: Project): protected_registry.minimum_access_level_for_push = "owner" protected_registry.save() assert protected_registry.minimum_access_level_for_push == "owner" + + protected_registry.delete() + + rules = project.registry_protection_repository_rules.list() + assert rules == [] diff --git a/tests/unit/objects/test_registry_protection_rules.py b/tests/unit/objects/test_registry_protection_rules.py index 3078278f5..3e9db414a 100644 --- a/tests/unit/objects/test_registry_protection_rules.py +++ b/tests/unit/objects/test_registry_protection_rules.py @@ -58,6 +58,17 @@ def resp_update_protected_registry(): yield rsps +@pytest.fixture +def resp_delete_protected_registry(): + with responses.RequestsMock() as rsps: + rsps.add( + method=responses.DELETE, + url="http://localhost/api/v4/projects/1/registry/protection/repository/rules/1", + status=204, + ) + yield rsps + + def test_list_project_protected_registries(project, resp_list_protected_registries): protected_registry = project.registry_protection_repository_rules.list()[0] assert isinstance(protected_registry, ProjectRegistryRepositoryProtectionRule) @@ -80,3 +91,7 @@ def test_update_project_protected_registry(project, resp_update_protected_regist 1, {"repository_path_pattern": "abc*"} ) assert updated["repository_path_pattern"] == "abc*" + + +def test_delete_project_protected_registry(project, resp_delete_protected_registry): + project.registry_protection_repository_rules.delete(1) From 8719985bdb88057cd8dbc2bd27f6a1161cdac6fd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Dec 2025 21:37:59 +0000 Subject: [PATCH 099/102] chore(deps): update github artifact actions --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eec3e1599..0f2af115e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -120,7 +120,7 @@ jobs: pip install -r requirements-test.txt - name: Build package run: python -m build -o dist/ - - uses: actions/upload-artifact@v5.0.0 + - uses: actions/upload-artifact@v6.0.0 with: name: dist path: dist @@ -134,7 +134,7 @@ jobs: uses: actions/setup-python@v6.1.0 with: python-version: '3.14' - - uses: actions/download-artifact@v6.0.0 + - uses: actions/download-artifact@v7.0.0 with: name: dist path: dist From f49175d5bcb3634fd9c707446e5fc879e911b7fb Mon Sep 17 00:00:00 2001 From: semantic-release Date: Sun, 28 Dec 2025 01:26:37 +0000 Subject: [PATCH 100/102] chore: release v7.1.0 --- CHANGELOG.md | 23 +++++++++++++++++++++++ gitlab/_version.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de7c0d113..ef85c5019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ All versions below are listed in reverse chronological order. +## v7.1.0 (2025-12-28) + +### Bug Fixes + +- **utils**: Prevent negative sleep time in rate limit retry + ([`4221195`](https://github.com/python-gitlab/python-gitlab/commit/422119576287de30e1b70411c7ab0bbe39231af7)) + +### Continuous Integration + +- **release**: Use the correct token for publish to GitHub + ([`614a74c`](https://github.com/python-gitlab/python-gitlab/commit/614a74c00f027f70b8e48a6b2a2ddcd3f823bffa)) + +### Features + +- **registry-protection**: Add support for registry protection rule deletion + ([`9dd62c3`](https://github.com/python-gitlab/python-gitlab/commit/9dd62c3f5bcf3e082c2733bd4edc068f993c22ec)) + +### Testing + +- **functional**: Update to GitLab 18.6 and resolve issues found + ([`c7c139b`](https://github.com/python-gitlab/python-gitlab/commit/c7c139b9e7823ec1800a819233aee469355ee8d1)) + + ## v7.0.0 (2025-10-29) ### Features diff --git a/gitlab/_version.py b/gitlab/_version.py index e7817062d..8305f3a6c 100644 --- a/gitlab/_version.py +++ b/gitlab/_version.py @@ -3,4 +3,4 @@ __email__ = "gauvainpocentek@gmail.com" __license__ = "LGPL3" __title__ = "python-gitlab" -__version__ = "7.0.0" +__version__ = "7.1.0" From c6901a2d9b6c13cadae6c9314582253e45301b72 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Dec 2025 01:14:05 +0000 Subject: [PATCH 101/102] chore(deps): update all non-major dependencies --- .pre-commit-config.yaml | 2 +- requirements-lint.txt | 2 +- requirements-test.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b93e8655..714fdfb98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,6 @@ repos: - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/maxbrunet/pre-commit-renovate - rev: 42.64.1 + rev: 42.66.11 hooks: - id: renovate-config-validator diff --git a/requirements-lint.txt b/requirements-lint.txt index 5006460d1..440d2aac8 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -11,4 +11,4 @@ responses==0.25.8 respx==0.22.0 types-PyYAML==6.0.12.20250915 types-requests==2.32.4.20250913 -types-setuptools==80.9.0.20251221 +types-setuptools==80.9.0.20251223 diff --git a/requirements-test.txt b/requirements-test.txt index b06434452..df8e6f47a 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,7 @@ -r requirements.txt anyio==4.12.0 build==1.3.0 -coverage==7.13.0 +coverage==7.13.1 pytest-console-scripts==1.4.1 pytest-cov==7.0.0 pytest-github-actions-annotate-failures==0.3.0 From 6f0da671b4586b23232ae89d57622254fa8a7945 Mon Sep 17 00:00:00 2001 From: Derek Schrock Date: Sun, 24 Aug 2025 20:27:38 -0400 Subject: [PATCH 102/102] feat(graphql): update to gql 4.0.0 BREAKING CHANGE: GraphQL.execute() no longer accepts graphql.Source --- .pre-commit-config.yaml | 4 ++-- gitlab/client.py | 7 ++----- pyproject.toml | 2 +- requirements.txt | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 714fdfb98..b9c06a408 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: pylint additional_dependencies: - argcomplete==2.0.0 - - gql==3.5.0 + - gql==4.0.0 - httpx==0.27.2 - pytest==7.4.2 - requests==2.28.1 @@ -37,7 +37,7 @@ repos: - id: mypy args: [] additional_dependencies: - - gql==3.5.0 + - gql==4.0.0 - httpx==0.27.2 - jinja2==3.1.2 - pytest==7.4.2 diff --git a/gitlab/client.py b/gitlab/client.py index 37dd4c2e6..a3cf1f31a 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -18,7 +18,6 @@ try: import gql import gql.transport.exceptions - import graphql import httpx from ._backends.graphql import GitlabAsyncTransport, GitlabTransport @@ -1350,7 +1349,7 @@ def __enter__(self) -> GraphQL: def __exit__(self, *args: Any) -> None: self._http_client.close() - def execute(self, request: str | graphql.Source, *args: Any, **kwargs: Any) -> Any: + def execute(self, request: str, *args: Any, **kwargs: Any) -> Any: parsed_document = self._gql(request) retry = utils.Retry( max_retries=self._max_retries, @@ -1420,9 +1419,7 @@ async def __aenter__(self) -> AsyncGraphQL: async def __aexit__(self, *args: Any) -> None: await self._http_client.aclose() - async def execute( - self, request: str | graphql.Source, *args: Any, **kwargs: Any - ) -> Any: + async def execute(self, request: str, *args: Any, **kwargs: Any) -> Any: parsed_document = self._gql(request) retry = utils.Retry( max_retries=self._max_retries, diff --git a/pyproject.toml b/pyproject.toml index 7b8510b94..45e8c36f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dynamic = ["version"] [project.optional-dependencies] autocompletion = ["argcomplete>=1.10.0,<3"] yaml = ["PyYaml>=6.0.1"] -graphql = ["gql[httpx]>=3.5.0,<4"] +graphql = ["gql[httpx]>=3.5.0,<5"] [project.scripts] gitlab = "gitlab.cli:main" diff --git a/requirements.txt b/requirements.txt index 6930e5d2c..d51e14533 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -gql==3.5.3 +gql==4.0.0 httpx==0.28.1 requests==2.32.5 requests-toolbelt==1.0.0