Create a comment, whatever the object is a PR, a commit or an issue.
355717
def create_comment(github_object, body):
    
    try:
        return github_object.create_issue_comment(body)  # It's a PR
    except AttributeError:
        return github_object.create_comment(body)
643486
def set_comment(self, key_name, new_comment):
        """"""
        kf = self.dct[key_name]
        kf['comment'] = new_comment
644979
def post_comment(self, bugid, comment):
        ''''''
        data = {'id': bugid, "comment": comment}
        return self._post('bug/{bugid}/comment'.format(bugid=bugid), json.dumps(data))
1072792
def comment(comment, opts = {})
      @context.lines << Lines::Comment.new(
        line_options(opts.merge(:comment => comment))
      )
    end
881791
def create_comment(self, post_id, body):
        
        path = '/msg/create_comment'
        req = ET.Element('request')
        comment = ET.SubElement(req, 'comment')
        ET.SubElement(comment, 'post-id').text = str(int(post_id))
        ET.SubElement(comment, 'body').text = str(body)
        return self._request(path, req)
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]
1103204
def _handle_comment(self, token):
        """"""
        self._push()
        while self._tokens:
            token = self._tokens.pop()
            if isinstance(token, tokens.CommentEnd):
                contents = self._pop()
                return Comment(contents)
            else:
                self._write(self._handle_token(token))
        raise ParserError("_handle_comment() missed a close token")
626677
def comment (self, data):
        
        data = data.encode(self.encoding, "ignore")
        self.fd.write("<!--%s-->" % data)
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
97815
def add_issue_comment(self, issue_id_or_key, content, extra_request_params={}):
        
        request_params = extra_request_params
        request_params["content"] = content
        return self.do("POST", "issues/{issue_id_or_key}/comments",
                       url_params={"issue_id_or_key": issue_id_or_key},
                       request_params=request_params,
                       )
1206046
def comment(opts)
      opts = opts.merge(:sale_id => self.sale_id)
      Twocheckout::API.request(:post, 'sales/create_comment', opts)
    end
269091
def create(self, user: str, *,
               pwd: str, sgrp: str, comment: str=None) -> None:
        """"""
        data = {
            'action': 'add',
            'user': user,
            'pwd': pwd,
            'grp': 'users',
            'sgrp': sgrp
        }

        if comment:
            data['comment'] = comment

        self._request('post', URL, data=data)
305080
function attachCommentReply(comment) {
    return function reply(body, callback) {
        github.replyToReviewComment(this.repo.data.owner.login, this.repo.data.name, this.data.number, comment.id, body, callback);
    }.bind(this);
}
612136
def write_comment(self, comment):
        
        self._FITS.write_comment(self._ext+1, str(comment))
838490
def comments_for(context, obj):
    
    form_class = import_dotted_path(settings.COMMENT_FORM_CLASS)
    form = form_class(context["request"], obj)
    context_form = context.get("posted_comment_form", form)
    context.update({
        'posted_comment_form':
            context_form if context_form.target_object == obj else form,
        'unposted_comment_form': form,
        'comment_url': reverse("comment"),
        'object_for_comments': obj,
    })
    return context
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))
508598
def create_comment_edit(self, ):
        
        pte = JB_PlainTextEdit(parent=self)
        pte.set_placeholder("Enter a comment before saving...")
        pte.setMaximumHeight(120)
        return pte