Creates a Markdown representation of the comment to be posted to a pull request.
    :return: The comment
777738
def build_pr_comment(config, violations):
    
    template = env.get_template('pr_comment.txt')
    return template.render(violations=violations, LINTLY_IDENTIFIER=LINTLY_IDENTIFIER)
1320026
def comment(node):
    
    parent = node.parentNode
    comment = node.ownerDocument.createComment(node.toxml())
    parent.replaceChild(comment, node)
    return comment
1147304
def add_comment(self, comment, metadata=""):
        
        data = {
            'comment': comment,
            'metadata': metadata
        }

        return self.post('createComment', data)
1160932
function () {
                var comment;

                if (input.charAt(i) !== '/') { return; }

                if (input.charAt(i + 1) === '/') {
                    return new(tree.Comment)($re(/^\/\/.*/), true, i, env.currentFileInfo);
                }
                comment = $re(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/);
                if (comment) {
                    return new(tree.Comment)(comment, false, i, env.currentFileInfo);
                }
            }
591163
def to_markdown(self):
        
        if self.type == "text":
            return self.text
        elif self.type == "url" or self.type == "image":
            return "[" + self.text + "](" + self.attributes["ref"] + ")"
        elif self.type == "title":
            return "#" * int(self.attributes["size"]) + " " + self.text

        return None
437719
def comment_from_tag(tag):
    
    if not tag:
        return None
    comment = Comment(name=tag.name,
                      meta={'description': tag.description},
                      annotations=tag.annotations)
    return comment
416166
def add_comment(repo: GithubRepository, pull_id: int, text: str) -> None:
    
    url = ("https://api.github.com/repos/{}/{}/issues/{}/comments"
           "?access_token={}".format(repo.organization,
                                     repo.name,
                                     pull_id,
                                     repo.access_token))
    data = {
        'body': text
    }
    response = requests.post(url, json=data)

    if response.status_code != 201:
        raise RuntimeError('Add comment failed. Code: {}. Content: {}.'.format(
            response.status_code, response.content))
221611
def process_composite_comment(self, level, comments, key):
        
        if key not in comments:
            comment = ""
        else:
            value = comments[key]
            spacer = self.whitespace(level, 0)

            if isinstance(value, list):
                comments = [self.format_comment(spacer, v) for v in value]
                comment = self.newlinechar.join(comments)
            else:
                comment = self.format_comment(spacer, value)

        return comment
1206046
def comment(opts)
      opts = opts.merge(:sale_id => self.sale_id)
      Twocheckout::API.request(:post, 'sales/create_comment', opts)
    end
292846
def to_markdown_(self) -> str:
        
        try:
            renderer = pytablewriter.MarkdownTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to markdown")
1278791
def comment(string, options = {})
      options = {
        :style => :css,
        :per_line => true
      }.update(options)
      
      commenters = {
        :html => Proc.new{|s| "<!-- #{s} -->" },
        :css => Proc.new{|s| "/*! #{s} */" },
        :js => Proc.new{|s| "/*! #{s} */" }                
      }
      
      commenter = commenters[options[:style]] || commenters[:js]
      
      if options[:per_line]
        string = string.split(/\r?\n/)
        string.map{|s| commenter.call(s) }.join("\n")
      else
        commenter.call(s)
      end
    end
444506
def _add_comment(self, thing_id, text):
        
        def add_comment_helper(self, thing_id, text):
            data = {'thing_id': thing_id,
                    'text': text}
            retval = self.request_json(self.config['comment'], data=data,
                                       retry_on_error=False)
            return retval

        if thing_id.startswith(self.config.by_object[objects.Message]):
            decorator = decorators.restrict_access(scope='privatemessages')
        else:
            decorator = decorators.restrict_access(scope='submit')
        retval = decorator(add_comment_helper)(self, thing_id, text)
        # REDDIT: reddit's end should only ever return a single comment
        return retval['data']['things'][0]
1072792
def comment(comment, opts = {})
      @context.lines << Lines::Comment.new(
        line_options(opts.merge(:comment => comment))
      )
    end
588462
def comments(self):
        

        endpoint = self.links["replies"]
        if self._comments is None:
            self._comments = Feed(endpoint, pypump=self._pump)
        return self._comments
509075
def get_as_text(self):
        
        d = {
            'user': self.user or self.name,
            'date': self.submit_date,
            'comment': self.comment,
            'domain': self.site.domain,
            'url': self.get_absolute_url()
        }
        return _('Posted by %(user)s at %(date)s\n\n%(comment)s\n\nhttp://%(domain)s%(url)s') % d
1240838
def comment_out_line(filename, line, comment='#'):
    '''
    '''
    return comment_out_local(filename, line, comment,
                             update_or_append_line=update_or_append_line)
1311855
def comment_out_magics(source):
    
    filtered = []
    for line in source.splitlines():
        if line.strip().startswith('%'):
            filtered.append('# ' +  line)
        else:
            filtered.append(line)
    return '\n'.join(filtered)