diff --git a/python/robomp/src/github_events.py b/python/robomp/src/github_events.py index 8aea67c36..644e513f4 100644 --- a/python/robomp/src/github_events.py +++ b/python/robomp/src/github_events.py @@ -153,7 +153,7 @@ def extract_mention(body: str | None, bot_login: str) -> str | None: if not login: return None pattern = re.compile( - rf"(? None: assert extract_mention("@roboomp[bot] go ahead", "roboomp[bot]") == "go ahead" +def test_extract_mention_rejects_extended_literal_app_suffix() -> None: + assert extract_mention("@roboomp[bot]-helper go ahead", "roboomp[bot]") is None + + def test_extract_mention_returns_none_without_mention() -> None: assert extract_mention("hello there", "robomp-bot") is None assert extract_mention(None, "robomp-bot") is None