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 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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