<commit_before>import logging

from django.contrib.sites.models import Site
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import SignalHook
from reviewboard.reviews.signals import review_request_published
from reviewboard.changedescs.models import ChangeDescription
from bzlib import bugzilla


MESSAGE = "A code review associated to this bug has been created at {0}"


def _extension_applies(review_request):
    if not review_request:
        return False

    bugs = review_request.get_bug_list()
    if not bugs:<commit_msg>Fix bug: check review's repository, not bug list<commit_after>import logging

from django.contrib.sites.models import Site
from reviewboard.extensions.base import Extension
from reviewboard.extensions.hooks import SignalHook
from reviewboard.reviews.signals import review_request_published
from reviewboard.changedescs.models import ChangeDescription
from bzlib import bugzilla


MESSAGE = "A code review associated to this bug has been created at {0}"


def _extension_applies(review_request):
    if not review_request:
        return False

    if not review_request.repository:
{'fraction_non_alphanumeric': 0.04882301656495205, 'fraction_numerical': 0.0017436791630340018, 'mean_word_length': 5.342541436464089, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '95518', 'n_tokens_mistral': 302, 'n_tokens_neox': 290, 'n_words': 106}