Get or create the dashboard comment in this issue.
483231
def get_or_create(cls, issue, header, text=None):
        
        for comment in get_comments(issue):
            try:
                if comment.body.splitlines()[0] == header:
                    obj = cls(comment, header)
                    break
            except IndexError: # The comment body is empty
                pass
        # Hooooooo, no dashboard comment, let's create one
        else:
            comment = create_comment(issue, header)
            obj = cls(comment, header)
        if text:
            obj.edit(text)
        return obj
1186452
def _handle_comment(self, comment):
        """"""
        if not comment:
            return ''
        start = self.indent_type
        if not comment.startswith('#'):
            start += self._a_to_u(' # ')
        return (start + comment)
384642
def post_comment(self, message):
        
        report_url = (
            'https://api.github.com/repos/%s/issues/%s/comments'
            % (self.repo_name, self.pr_number)
        )
        result = self.requester.post(report_url, {'body': message})
        if result.status_code >= 400:
            log.error("Error posting comment to github. %s", result.json())
        return result
376696
def create_comment(comment)
      post_params = {
        :body => comment.post_json,
        :headers => Logan::Client.headers.merge({'Content-Type' => 'application/json'})
      }

      response = Logan::Client.post "/projects/#{@project_id}/todos/#{@id}/comments.json", post_params
      Logan::Comment.new response
    end
765433
def serialize_comment(ctx, document, el, root):
    ""

    # Check if option is turned on

    if el.comment_type == 'end':
        ctx.opened_comments.remove(el.cid)
    else:
        if el.comment_type != 'reference':
            ctx.opened_comments.append(el.cid)

        if ctx.options['comment_span']:
            link = etree.SubElement(root, 'a')
            link.set('href', '#')
            link.set('class', 'comment-link')    
            link.set('id', 'comment-id-' + el.cid)    

            link.text = ''

            fire_hooks(ctx, document, el, link, ctx.get_hook('comment'))

    return root
1163491
def comments(self, issue):
        
        commit = self.as_id(issue)
        return self.get_list(url='%s/%s/comments' % (self, commit))
238117
def get_comments(self):
        
        bug = str(self._bug['id'])
        res = self._bugsy.request('bug/%s/comment' % bug)

        return [Comment(bugsy=self._bugsy, **comments) for comments
                in res['bugs'][bug]['comments']]
644979
def post_comment(self, bugid, comment):
        ''''''
        data = {'id': bugid, "comment": comment}
        return self._post('bug/{bugid}/comment'.format(bugid=bugid), json.dumps(data))
1228813
function commentIssue (client, repo, number, comment) {
  return client.createComment(repo, number, comment).then(convertComment);
}
287587
def on_comment_entered(self):
        """"""
        text_edit = self.findChild(QtWidgets.QWidget, "CommentBox")
        comment = text_edit.text()

        # Store within context
        context = self.controller.context
        context.data["comment"] = comment

        placeholder = self.findChild(QtWidgets.QLabel, "CommentPlaceholder")
        placeholder.setVisible(not comment)
827294
function getComments(comments) {
  if (!comments || !comments.body) return {};

  Object.assign(comments, {
    create_time: formatTime(comments.created_at),
    update_time: formatTime(comments.updated_at)
  })

  return comments;
}
519461
def get_list_comment(self, issue_id, comment_id):
        
        request_url = "{}issue/{}/comment/{}".format(self.create_basic_url(),
                                                     issue_id, comment_id)

        return_value = self._call_api(request_url)

        return return_value
1333144
public String getComment() {
    if (Timex2_Type.featOkTst && ((Timex2_Type)jcasType).casFeat_comment == null)
      jcasType.jcas.throwFeatMissing("comment", "de.julielab.jules.types.ace.Timex2");
    return jcasType.ll_cas.ll_getStringValue(addr, ((Timex2_Type)jcasType).casFeatCode_comment);}
731436
def get_comment(self, table: str, column: str) -> str:
        """"""
        return self.flavour.get_comment(self, table, column)
721216
def getcomments(self):
        
        comment_list = self.bugzilla.get_comments([self.bug_id])
        return comment_list['bugs'][str(self.bug_id)]['comments']
896468
def comment(self, message):
        """"""
        message = str(message)

        sw_repr = {
            '$type': 'Core.Models.Record.Comments, Core',
            'createdByUser': self._record._swimlane.user.as_usergroup_selection(),
            'createdDate': pendulum.now().to_rfc3339_string(),
            'message': message
        }

        comment = Comment(self._swimlane, sw_repr)
        self._elements.append(comment)

        self._record._raw['comments'].setdefault(self._field.id, [])
        self._record._raw['comments'][self._field.id].append(comment._raw)

        return comment
901409
def update_comment(self, comment_id, body):
        
        path = '/msg/update_comment'
        req = ET.Element('request')
        ET.SubElement(req, 'comment_id').text = str(int(comment_id))
        comment = ET.SubElement(req, 'comment')
        ET.SubElement(comment, 'body').text = str(body)
        return self._request(path, req)