DEVX-91: feat: add manual review support to pr_review (--event, --body, --checklist-confirmed)
This commit is contained in:
@@ -195,6 +195,29 @@ class TestExtractConventionalMsg:
|
||||
]
|
||||
assert extract_conventional_msg(commits) == "feat: add feature"
|
||||
|
||||
def test_prefers_feat_over_refactor(self) -> None:
|
||||
"""When both feat and refactor commits exist, feat wins."""
|
||||
commits = [
|
||||
{"commit": {"message": "refactor: add find_task_by_identifier"}},
|
||||
{"commit": {"message": "fix: remove hardcoded fallbacks"}},
|
||||
{"commit": {"message": "feat: add manual review support"}},
|
||||
]
|
||||
assert extract_conventional_msg(commits) == "feat: add manual review support"
|
||||
|
||||
def test_prefers_fix_over_docs(self) -> None:
|
||||
commits = [
|
||||
{"commit": {"message": "docs: update README"}},
|
||||
{"commit": {"message": "fix: resolve bug"}},
|
||||
]
|
||||
assert extract_conventional_msg(commits) == "fix: resolve bug"
|
||||
|
||||
def test_scope_in_prefix(self) -> None:
|
||||
commits = [
|
||||
{"commit": {"message": "refactor(ci): cleanup code"}},
|
||||
{"commit": {"message": "feat(api): add endpoint"}},
|
||||
]
|
||||
assert extract_conventional_msg(commits) == "feat(api): add endpoint"
|
||||
|
||||
|
||||
# -- run_cmd --
|
||||
|
||||
|
||||
Reference in New Issue
Block a user