<commit_before># From https://www.reamaze.com/api/post_messages

from lib.actions import BaseAction


class CreateMessage(BaseAction):
    VISIBILITY = {
        'internal': 1,
        'regular': 0,
    }

    def run(self, slug, message, visibility='internal',
            suppress_notification=False):

        payload = {
            'message': {
                'body': message,
                'visibility': CreateMessage.VISIBILITY[visibility]
            }
        }

        if suppress_notification:
            params['suppress_notificiaton'] = True

        endpoint = '/conversations/{}/messages'.format(slug)
        response = self._api_post(endpoint, json=payload)

        return response
<commit_msg>using  variable for suppressing notifications<commit_after># From https://www.reamaze.com/api/post_messages

from lib.actions import BaseAction


class CreateMessage(BaseAction):
    VISIBILITY = {
        'internal': 1,
        'regular': 0,
    }

    def run(self, slug, message, visibility='internal',
            suppress_notification=False):

        payload = {
            'message': {
                'body': message,
                'visibility': CreateMessage.VISIBILITY[visibility]
            }
        }

        if suppress_notification:
            payload['suppress_notificiaton'] = True

        endpoint = '/conversations/{}/messages'.format(slug)
        response = self._api_post(endpoint, json=payload)

        return response

{'fraction_non_alphanumeric': 0.10633946830265849, 'fraction_numerical': 0.0027266530334014998, 'mean_word_length': 2.219298245614035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3818219', 'n_tokens_mistral': 406, 'n_tokens_neox': 377, 'n_words': 78}