Pin approved head in Gitea merge request

This commit is contained in:
2026-09-22 11:06:33 -04:00
parent 26f812ac07
commit bca0d87f4a
5 changed files with 37 additions and 7 deletions
@@ -52,6 +52,10 @@ class MergeGateTests(unittest.TestCase):
with self.assertRaises(RuntimeError):
APPROVE["main"]()
self.assertEqual(merged, problem == "none")
if problem == "none":
merge_calls = [payload for path, payload in calls if path.endswith("/merge")]
self.assertEqual(merge_calls,
[{"do": "squash", "head_commit_id": HEAD}])
def test_review_evidence_must_match_exact_head_and_approval(self):
root = Path("/tmp/opencode")