From 41c9ec6dde4d4bf6699e6a1a276e344a7ae59067 Mon Sep 17 00:00:00 2001 From: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com> Date: Sun, 8 Nov 2026 14:51:23 +0000 Subject: [PATCH] chore(deps): bump commit-check from 2.19.5 to 2.20.0 --- .github/workflows/ci.yml | 13 ++++++------- README.md | 6 ++++-- action.yml | 7 +++++++ requirements.txt | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9823d0b..8430635 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,15 +14,14 @@ jobs: strategy: fail-fast: false matrix: - # The floor and the newest. 3.10 is the real floor: main.py annotates - # with `str | None` and has no `from __future__ import annotations`, so - # the annotation is evaluated at def time, and main_test.py uses - # parenthesized context managers. Both are 3.10+. + # The floor and the newest. 3.11 is the real floor: the pinned + # commit-check (2.20.0 and later) requires it, and the action refuses + # an older python3 before installing anything. # # The action itself runs on whatever python3 the runner ships, so the # in-between versions add little here — unlike commit-check, which is a # published package and tests every one. - py: ['3.10', '3.14'] + py: ['3.11', '3.14'] os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] runs-on: ${{ matrix.os }} steps: @@ -54,8 +53,8 @@ jobs: persist-credentials: false - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: - # 3.10 is the real floor, see the test job - python-version: "3.10" + # 3.11 is the real floor, see the test job + python-version: "3.11" - name: Install dependencies run: | pip install -r requirements.txt diff --git a/README.md b/README.md index 8a0db31..8edc378 100644 --- a/README.md +++ b/README.md @@ -256,8 +256,10 @@ fails when a contributor did not install the hook. The action is a composite step and uses what the runner already has: -- **Python 3.10 or newer** on `PATH` (`python3`, or `python` on Windows). No - `setup-python` step is needed on GitHub-hosted runners. Everything the action +- **Python 3.11 or newer** on `PATH` (`python3`, or `python` on Windows). The + `*-latest` GitHub-hosted runners already have it. `ubuntu-22.04` ships 3.10, + so add `actions/setup-python` with `python-version: "3.11"` (or newer) before + this step there. Everything the action installs goes under `$RUNNER_TEMP`, never into your checkout. - **`gh` CLI** — used to verify the build-provenance attestation of the `commit-check` wheel before installing it. Present on GitHub-hosted images; diff --git a/action.yml b/action.yml index 7304b8c..f0e489c 100644 --- a/action.yml +++ b/action.yml @@ -63,6 +63,13 @@ runs: PYTHON_CMD="python3" fi + # The pinned commit-check needs Python 3.11+. Say so here: on an older + # python3, pip would only report that no matching version exists. + if ! $PYTHON_CMD -c 'import sys; sys.exit(sys.version_info < (3, 11))'; then + echo "::error::commit-check-action needs Python 3.11 or newer on PATH, found $($PYTHON_CMD --version 2>&1). Add actions/setup-python with python-version 3.11 or newer before this step." + exit 1 + fi + # Everything the action installs lives under $RUNNER_TEMP, never in the # caller's checkout: a later `git status`, linter or upload-artifact step # must not see our venv or wheels. diff --git a/requirements.txt b/requirements.txt index 9b345e1..08754b0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Install commit-check CLI # For details please see: https://github.com/commit-check/commit-check -commit-check==2.19.5 +commit-check==2.20.0 # Interact with the GitHub API. PyGithub==2.10.0