Merge pull request #19 from kevinveenbirkenbach/feature/release-expect-tree

feat(release): refuse a release whose HEAD tree is not the audited one
This commit is contained in:
Kevin Veen-Birkenbach authored and GitHub committed 2026-12-01 09:58:17 +01:00
commit 828d7885d1
13 files changed
+527 -303

No files matched your search

+6 -1
View File
@@ -10,6 +10,7 @@ from contextlib import redirect_stdout, suppress
from pathlib import Path
from unittest.mock import patch
from pkgmgr.actions.release.options import ReleaseOptions
from pkgmgr.actions.release.retry import retry_release
from pkgmgr.actions.release.workflow import _release_impl
from pkgmgr.actions.repository.push import (
@@ -381,7 +382,11 @@ class TestPushMirrorLeases(unittest.TestCase):
with redirect_stdout(io.StringIO()), self.assertRaises(PushRefusedError):
_release_impl(
pyproject_path=os.path.join(self.repo, "pyproject.toml"), force=True
ReleaseOptions(
pyproject_path=os.path.join(self.repo, "pyproject.toml"),
force=True,
expect_tree=None,
)
)
self.assertEqual(git(self.repo, "rev-parse", "HEAD"), head)