ci: lint workflows with zizmor

Add zizmor (v1.32.0, pinned by SHA) as a pre-commit hook over
.gitea/workflows, offline at its default level; it fails on
pull_request_target and on ${{ }} expanded into run:. The ci image
bakes and smoke-tests the new hook environment, so its version moves
to 0.2.32.

image.yml drops `packages: write` and the job-token probe: Gitea 28
refuses the job token for organisation packages, and the latest build
used the org push token. One probe of that token now fails fast.

Refs #145

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-21 18:52:22 +00:00
1 parent 96a090cead
commit e45b92551a
6 files changed
+46 -44

No files matched your search

+8
View File
@@ -319,6 +319,14 @@ class RuleTest(unittest.TestCase):
cbd.file_problem(".pre-commit-config.yaml", [" rev: a"], [])
)
def test_a_bump_of_the_real_zizmor_rev_line_is_allowed(self):
# The line as Renovate's git-tags lookup finds it in this repository's config.
config = (SCRIPTS.parent / ".pre-commit-config.yaml").read_text().splitlines()
repo = config.index(" - repo: https://github.com/zizmorcore/zizmor-pre-commit")
rev = config[repo + 1]
bumped = f" rev: {'f' * 40} # frozen: v99.0.0"
self.assertIsNone(cbd.file_problem(".pre-commit-config.yaml", [rev], [bumped]))
def test_patch_parser_keeps_dashed_content(self):
patch = "diff --git a/f b/f\n--- a/f\n+++ b/f\n@@ -1 +1 @@\n--- x\n+++ y\n\\ No newline at end of file\n"
self.assertEqual(cbd.parse_patch(patch), (["-- x"], ["++ y"]))