def get_new_comment(self, clear=False, staged=False, ready=True):
        try:
            with io.open(
                self.get_local_path(constants.TICKET_NEW_COMMENT),
                'r+',
                encoding='utf-8',
            ) as c:
                local_contents = c.read().strip()
            if ready:
                contents = self.get_local_file_at_revision(
                    constants.TICKET_NEW_COMMENT,
                    'HEAD'
                )
                if contents:
                    contents = contents.strip()
                else:
                    contents = ''
            else:
                contents = local_contents

            if not ready and contents == self.get_new_comment(ready=True):
                contents = ''

            if contents == local_contents and clear:
                with io.open(
                    self.get_local_path(constants.TICKET_NEW_COMMENT),
                    'r+',
                    encoding='utf-8',
                ) as c:
                    c.truncate()
        except __HOLE__:
            contents = ''

        # Apply macro plugins
        contents = self.process_macros(contents)

        return self.execute_plugin_method_series(
            name='alter_new_comment',
            args=(contents, ),
            single_response=True,
        )
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/ticketfolder.py/TicketFolder.get_new_comment