in bot/code_review_bot/__init__.py [0:0]
def is_publishable(self):
"""
Is this issue publishable on reporters ?
"""
assert self.revision is not None, "Missing revision"
# Always check specific rules validate
if not self.validates():
return False
if self.allow_before_and_after_publish:
# Only publish new issues or issues inside the diff
return self.new_issue or self.in_patch
# An error is always published
if self.level == Level.Error:
return True
# Then check if the backend marks this issue as publishable
if self.on_backend is not None:
return self.on_backend["publishable"]
# Fallback to in_patch detection
return self.in_patch