From a00a2299154cd73715bc3b06b6580a75edaec635 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Tue, 6 May 2025 20:51:01 -0400 Subject: [PATCH 01/12] README: remove pyversion badge (#10) --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 231b938..956331e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![image](https://img.shields.io/pypi/v/zizmor/1.6.0.svg)](https://pypi.python.org/pypi/zizmor) [![image](https://img.shields.io/pypi/l/zizmor/1.6.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/pyversions/zizmor/1.6.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/woodruffw/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/woodruffw/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Zizmor](https://github.com/woodruffw/zizmor). From bac1abfcff0b2bcc918d70df882471f5aefa6aa3 Mon Sep 17 00:00:00 2001 From: graingert Date: Fri, 9 May 2025 04:03:18 +0000 Subject: [PATCH 02/12] Mirror: 1.7.0 --- README.md | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 956331e..dff7266 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.6.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.6.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/woodruffw/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/woodruffw/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Zizmor](https://github.com/woodruffw/zizmor). @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/woodruffw/zizmor-pre-commit # Zizmor version. - rev: v1.6.0 + rev: v1.7.0 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index 7552c96..daf4e1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.6.0", + "zizmor==1.7.0", ] [project.optional-dependencies] From ca05dcb8ed336fb93aac5fc7b6152c007ffb0725 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Fri, 9 May 2025 20:24:12 -0400 Subject: [PATCH 03/12] chore: rename to @zizmorcore (#11) --- .github/workflows/lint.yml | 6 +++--- .github/workflows/main.yml | 6 +++--- .pre-commit-hooks.yaml | 2 +- README.md | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e4eab8c..138f6fb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - - uses: actions/setup-python@v5 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.x" - - uses: tox-dev/action-pre-commit-uv@v1 + - uses: tox-dev/action-pre-commit-uv@270ddcea3d0ff0ef1527f49d12590954f31b4b3f # v1.0.2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 17534cf..7b78d1a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,12 +16,12 @@ jobs: - if: ${{ startsWith(github.event_name, 'repository_dispatch') }} run: sleep 30 - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: # NOTE: needed for git operations below persist-credentials: true - - uses: actions/setup-python@v5 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: "3.11" @@ -62,7 +62,7 @@ jobs: echo $TAG_NAME gh release create "$TAG_NAME" \ --title "$TAG_NAME" \ - --notes "See: https://github.com/woodruffw/zizmor/releases/tag/${TAG_NAME}" \ + --notes "See: https://github.com/zizmorcore/zizmor/releases/tag/${TAG_NAME}" \ --latest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 725632f..7e7256b 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -7,4 +7,4 @@ require_serial: true entry: zizmor args: - - "--no-progress" # https://github.com/woodruffw/zizmor/issues/582 + - "--no-progress" # https://github.com/zizmorcore/zizmor/issues/582 diff --git a/README.md b/README.md index dff7266..86a511a 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,20 @@ [![image](https://img.shields.io/pypi/v/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) [![image](https://img.shields.io/pypi/l/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) -[![Actions status](https://github.com/woodruffw/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/woodruffw/zizmor-pre-commit/actions) +[![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) -A [pre-commit](https://pre-commit.com/) hook for [Zizmor](https://github.com/woodruffw/zizmor). +A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). -Distributed as a standalone repository to enable installing Zizmor via prebuilt wheels from +Distributed as a standalone repository to enable installing `zizmor` via prebuilt wheels from [PyPI](https://pypi.org/project/zizmor/). -### Using Zizmor with pre-commit +### Using zizmor with pre-commit To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml`: ```yaml repos: -- repo: https://github.com/woodruffw/zizmor-pre-commit +- repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. rev: v1.7.0 hooks: From 204b2dae41388370eb5571c6a5acf27e19a4a450 Mon Sep 17 00:00:00 2001 From: graingert Date: Tue, 20 May 2025 20:13:22 +0000 Subject: [PATCH 04/12] Mirror: 1.8.0rc1 --- README.md | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 86a511a..4853e69 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.7.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.8.0rc1.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.8.0rc1.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.7.0 + rev: v1.8.0rc1 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index daf4e1e..e92a27a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.7.0", + "zizmor==1.8.0rc1", ] [project.optional-dependencies] From 7ecc46f38c50608231120fa00746a1c63aa10dfa Mon Sep 17 00:00:00 2001 From: graingert Date: Tue, 20 May 2025 20:13:22 +0000 Subject: [PATCH 05/12] Mirror: 1.8.0rc2 --- README.md | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4853e69..ec8396c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.8.0rc1 + rev: v1.8.0rc2rc1 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index e92a27a..63f9ff2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.8.0rc1", + "zizmor==1.8.0rc2", ] [project.optional-dependencies] From 865882dc13c8804c84ec7ae0c0645983d8f00e69 Mon Sep 17 00:00:00 2001 From: graingert Date: Tue, 20 May 2025 20:13:22 +0000 Subject: [PATCH 06/12] Mirror: 1.8.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 63f9ff2..233af4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.8.0rc2", + "zizmor==1.8.0", ] [project.optional-dependencies] From da71ec3b2eb7b518180a438e64190309dd3847e5 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Tue, 20 May 2025 16:15:27 -0400 Subject: [PATCH 07/12] undo rev borkage Signed-off-by: William Woodruff --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec8396c..c0f871e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.8.0rc2rc1 + rev: v1.8.0 hooks: # Run the linter. - id: zizmor From c56b7ab29dd882cb11f9b7b7dedfdbca72d6c332 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Tue, 20 May 2025 16:17:06 -0400 Subject: [PATCH 08/12] README: unbork badge URLs Signed-off-by: William Woodruff --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0f871e..7d93c19 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.8.0rc1.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.8.0rc1.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.8.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.8.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). From d2c1833a059c66713cd52c032617766134679a0f Mon Sep 17 00:00:00 2001 From: woodruffw Date: Fri, 30 May 2025 21:49:12 +0000 Subject: [PATCH 09/12] Mirror: 1.9.0 --- README.md | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7d93c19..e573c5b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.8.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.8.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.9.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.9.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.8.0 + rev: v1.9.0 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index 233af4a..6c5dff8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.8.0", + "zizmor==1.9.0", ] [project.optional-dependencies] From 8ed4823893eaf1bf002103f4a036b06fadf63fdb Mon Sep 17 00:00:00 2001 From: dublinsubway <61555192+dublinsubway@users.noreply.github.com> Date: Mon, 2 Jun 2025 16:28:52 +0100 Subject: [PATCH 10/12] Add semantic version check (#13) Co-authored-by: William Woodruff --- .pre-commit-config.yaml | 4 ++-- mirror.py | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32206d5..1efb3b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.2 + rev: v0.11.12 hooks: - id: ruff args: [--fix] @@ -25,7 +25,7 @@ repos: - id: check-github-workflows - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.5.0 + rev: v1.9.0 hooks: - id: zizmor diff --git a/mirror.py b/mirror.py index f9edd74..1b7dc35 100644 --- a/mirror.py +++ b/mirror.py @@ -34,21 +34,25 @@ def get_all_versions() -> list[Version]: if response.status != 200: raise RuntimeError("Failed to fetch versions from pypi") - versions = [Version(release) for release in response.json()["releases"]] + versions = [ + Version(release) + for release in response.json()["releases"] + if not Version(release).is_prerelease + ] return sorted(versions) def get_current_version(pyproject: dict) -> Version: requirements = [Requirement(d) for d in pyproject["project"]["dependencies"]] requirement = next((r for r in requirements if r.name == PACKAGE), None) - assert ( - requirement is not None - ), f"pyproject.toml does not have {PACKAGE} requirement" + assert requirement is not None, ( + f"pyproject.toml does not have {PACKAGE} requirement" + ) specifiers = list(requirement.specifier) - assert ( - len(specifiers) == 1 and specifiers[0].operator == "==" - ), f"{PACKAGE}'s specifier should be exact matching, but `{requirement}`" + assert len(specifiers) == 1 and specifiers[0].operator == "==", ( + f"{PACKAGE}'s specifier should be exact matching, but `{requirement}`" + ) return Version(specifiers[0].version) From ea492445acc5ef6033ed21fae41a49a2a3b4421a Mon Sep 17 00:00:00 2001 From: woodruffw Date: Thu, 26 Jun 2025 18:44:57 +0000 Subject: [PATCH 11/12] Mirror: 1.10.0 --- README.md | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e573c5b..c5180bf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.9.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.9.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.10.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.10.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.9.0 + rev: v1.10.0 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index 6c5dff8..34a81f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.9.0", + "zizmor==1.10.0", ] [project.optional-dependencies] From 69fa534d69454f44ddd4451b5e2da7a1c48e525b Mon Sep 17 00:00:00 2001 From: woodruffw Date: Mon, 30 Jun 2025 19:10:22 +0000 Subject: [PATCH 12/12] Mirror: 1.11.0 --- README.md | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c5180bf..2d32639 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # zizmor-pre-commit -[![image](https://img.shields.io/pypi/v/zizmor/1.10.0.svg)](https://pypi.python.org/pypi/zizmor) -[![image](https://img.shields.io/pypi/l/zizmor/1.10.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/v/zizmor/1.11.0.svg)](https://pypi.python.org/pypi/zizmor) +[![image](https://img.shields.io/pypi/l/zizmor/1.11.0.svg)](https://pypi.python.org/pypi/zizmor) [![Actions status](https://github.com/zizmorcore/zizmor-pre-commit/workflows/main/badge.svg)](https://github.com/zizmorcore/zizmor-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [zizmor](https://github.com/zizmorcore/zizmor). @@ -17,7 +17,7 @@ To run zizmor via pre-commit, add the following to your `.pre-commit-config.yaml repos: - repo: https://github.com/zizmorcore/zizmor-pre-commit # Zizmor version. - rev: v1.10.0 + rev: v1.11.0 hooks: # Run the linter. - id: zizmor diff --git a/pyproject.toml b/pyproject.toml index 34a81f9..6d96c2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "zizmor-pre-commit" version = "0.0.0" dependencies = [ - "zizmor==1.10.0", + "zizmor==1.11.0", ] [project.optional-dependencies]