From 9ae67c3ceeb840c8af8e60ba6b762f0d01f8d460 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 18 Oct 2026 11:35:04 +0000 Subject: [PATCH 1/2] Update CI files --- .ci/scripts/check_changelog_snippets.py | 39 +++++++++++++++++++++++++ .github/workflows/lint.yml | 4 +++ 2 files changed, 43 insertions(+) create mode 100755 .ci/scripts/check_changelog_snippets.py diff --git a/.ci/scripts/check_changelog_snippets.py b/.ci/scripts/check_changelog_snippets.py new file mode 100755 index 000000000..5501373ea --- /dev/null +++ b/.ci/scripts/check_changelog_snippets.py @@ -0,0 +1,39 @@ +#!/bin/env python3 +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# ] +# /// +import re +import sys +import tomllib +from pathlib import Path + +EXCEPTIONS = [ + ".TEMPLATE.md", + ".gitkeep", + ".gitignore", + "pulp_deb", +] + + +def snippet_valid(path: Path, changelog_exts: list[str]) -> bool: + return (path.name in EXCEPTIONS) or ( + path.suffix in changelog_exts + and (path.stem.startswith("+") or re.fullmatch(r"\d*", path.stem)) + ) + + +if __name__ == "__main__": + with Path("pyproject.toml").open("rb") as fp: + pyproject_toml = tomllib.load(fp) + try: + changelog_exts = [ + f".{item['directory']}" for item in pyproject_toml["tool"]["towncrier"]["type"] + ] + except KeyError: + changelog_exts = [".feature", ".bugfix", ".doc", ".removal", ".misc"] + matches = Path("CHANGES").rglob("*") + invalid_snippets = ", ".join(f"'{s}'" for s in matches if not snippet_valid(s, changelog_exts)) + if invalid_snippets: + sys.exit(f"LINT: Invalid changelog entries: {invalid_snippets}.") diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c2502f588..656b2a621 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -51,6 +51,10 @@ jobs: run: | ruff check + - name: "Check Changelog Snippets" + run: | + uv run .ci/scripts/check_changelog_snippets.py + - name: "Run extra lint checks" run: | [ ! -x .ci/scripts/extra_linting.sh ] || .ci/scripts/extra_linting.sh From b1f1fffafe46862d64d2fe0f937dda6e424e4fe5 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 18 Oct 2026 11:35:04 +0000 Subject: [PATCH 2/2] Bump pulpcore lowerbounds to supported branch --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f16c51eb..a4ccf8340 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ requires-python = ">=3.11" dependencies = [ # All things django and asyncio are deliberately left to pulpcore # Example transitive requirements: asgiref, asyncio, aiohttp - "pulpcore>=3.113.0,<3.130", + "pulpcore>=3.118.0,<3.130", "python-debian>=0.1.44,<0.2.0", "jsonschema>=4.6,<5.0", ]