DEVX-60: feat: add create-task, create-pr, pre-push-check tools and devx.mak fragment
Post-merge / detect-type (push) Successful in 6s
Post-merge / validate-commit-msg (push) Successful in 6s
Post-merge / configure-repo (push) Successful in 9s
Post-merge / release (push) Successful in 1m0s
Post-merge / vikunja (push) Successful in 14s
Post-merge / sync-wiki (push) Successful in 59s
Post-merge / badges (push) Successful in 1m12s

This commit was merged in pull request #98.
This commit is contained in:
2026-06-26 14:29:47 +00:00
parent a3d528f802
commit 44c906a5e6
25 changed files with 1378 additions and 4 deletions
+34
View File
@@ -508,6 +508,30 @@ class TestVerifyAlignment:
mock_run_cmd.return_value = MagicMock(returncode=0, stdout="", stderr="")
assert verify_alignment() == 1
@patch("devx.ci.release.run_cmd")
@patch("devx.ci.release.get_changelog_versions")
@patch("devx.ci.release.get_init_version")
@patch("devx.ci.release.verify_tag_consistency")
@patch("devx.ci.release.get_all_tags")
@patch("devx.ci.release.get_latest_tag")
def test_no_latest_tag_skips_changelog_tag_check(
self,
mock_lt: MagicMock,
mock_tags: MagicMock,
mock_vtc: MagicMock,
mock_iv: MagicMock,
mock_cv: MagicMock,
mock_run_cmd: MagicMock,
) -> None:
"""When there is no latest tag, the CHANGELOG/tag match check is skipped."""
mock_lt.return_value = None # no tags
mock_tags.return_value = []
mock_vtc.return_value = []
mock_iv.return_value = "0.4.4"
mock_cv.return_value = ["0.4.4"] # changelog has versions but no tag to compare
mock_run_cmd.return_value = MagicMock(returncode=0, stdout="", stderr="")
assert verify_alignment() == 0
@patch("devx.ci.release.run_cmd")
@patch("devx.ci.release.get_changelog_versions")
@patch("devx.ci.release.get_init_version")
@@ -756,6 +780,16 @@ class TestUpdateChangelog:
assert "# Changelog" not in content
assert "## [0.2.0]" in content
def test_no_version_section_in_changelog(self, tmp_path, monkeypatch) -> None:
"""Changelog input without any ## [ version section is inserted as-is."""
changelog_file = tmp_path / "CHANGELOG.md"
changelog_file.write_text("# Changelog\n\n## [0.1.0] - 2026-06-20\n\n### Features\n- old thing\n")
monkeypatch.setattr("devx.ci.release.CHANGELOG_FILE", str(changelog_file))
# No ## [ section in the cliff output — should not be stripped
update_changelog("Some raw text without version header")
content = changelog_file.read_text()
assert "Some raw text without version header" in content
class TestCommitReleaseChanges:
@patch("devx.ci.release.run_cmd")