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/stale.yml b/.github/workflows/stale.yml index 1b4e9728d..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 @@ -15,7 +17,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/.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 1eae958af..75b98ce66 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.146.0 hooks: - id: renovate-config-validator diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cf99cd4..f13242484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,193 @@ # CHANGELOG +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 + +- **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/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/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() 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" 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") ) 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): 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. diff --git a/requirements-docs.txt b/requirements-docs.txt index 39f5f61e2..b83ef6dac 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,7 +1,7 @@ -r requirements.txt -furo==2025.7.19 +furo==2025.9.25 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 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..369c95673 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-cov==7.0.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