Answer security round 1: 0 🔴, 0 🟡 (0 misread); refuse a malformed epic key and a comment that starts with a dash
CI / tests (pull_request) Successful in 3m44s
CI / tests (pull_request) Successful in 3m44s
This commit is contained in:
@@ -368,8 +368,8 @@ def language_fault(value: object) -> str | None:
|
||||
|
||||
|
||||
def comment_fault(value: object) -> str | None:
|
||||
"""Why value is no comment to post on a pull request; None where it is one."""
|
||||
return None if isinstance(value, str) and value.strip() and "\n" not in value else 'not one line of text, such as "@coderabbitai review"'
|
||||
"""Why value is no comment to post on a pull request; None where it is one. A forge's CLI would read one that starts with `-` as an option."""
|
||||
return None if isinstance(value, str) and value.strip() and "\n" not in value and not value.startswith("-") else 'not one line of text that doesn\'t start with `-`, such as "@coderabbitai review"'
|
||||
|
||||
|
||||
# Each one-value setting, in the order `project-config` lists them.
|
||||
|
||||
Reference in New Issue
Block a user