Add a comment to a ticket.

@param string       $issue_key Issue key should be "YOURPROJ-221".
@param array|string $params    Params.

@return Result|false
515590
public function addComment($issue_key, $params)
	{
		if ( is_string($params) ) {
			// If $params is scalar string value -> wrapping it properly.
			$params = array(
				'body' => $params,
			);
		}

		return $this->api(self::REQUEST_POST, sprintf('/rest/api/2/issue/%s/comment', $issue_key), $params);
	}
1183216
def ticket_comments(self, ticket_id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/comments.json"
        api_path = api_path.format(ticket_id=ticket_id)
        return self.call(api_path, **kwargs)
777738
def build_pr_comment(config, violations):
    
    template = env.get_template('pr_comment.txt')
    return template.render(violations=violations, LINTLY_IDENTIFIER=LINTLY_IDENTIFIER)
284172
@Override
    public IssueResponse issue(String CorpNum, MgtKeyType KeyType, String MgtKey,
                          String Memo) throws PopbillException {
        return issue(CorpNum, KeyType, MgtKey, Memo, null);
    }
1334798
def ticket_comment_attachment_redact(self, ticket_id, comment_id, attachment_id, data, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/comments/{comment_id}/attachments/{attachment_id}/redact.json"
        api_path = api_path.format(ticket_id=ticket_id, comment_id=comment_id, attachment_id=attachment_id)
        return self.call(api_path, method="PUT", data=data, **kwargs)
501188
public function getTransitions($issue_key, array $params)
	{
		return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/issue/%s/transitions', $issue_key), $params);
	}
168259
def issue(ctx, accountable, issue_key):
    
    accountable.issue_key = issue_key
    if not ctx.invoked_subcommand:
        issue = accountable.issue_meta()
        headers = issue.keys()
        rows = [headers, [v for k, v in issue.items()]]
        print_table(SingleTable(rows))
526653
def create(user_name, repo_name, issue_id, params={})
      _update_user_repo_params(user_name, repo_name)
      _validate_user_repo_params(user, repo) unless user? && repo?
      _validate_presence_of issue_id

      normalize! params
      # _merge_mime_type(:issue_comment, params)
      filter! VALID_ISSUE_COMMENT_PARAM_NAME, params
      assert_required_keys(%w[ content ], params)

      post_request("/1.0/repositories/#{user}/#{repo.downcase}/issues/#{issue_id}/comments/", params)
    end
317359
func (s *IssueService) AddComment(issueID string, comment *Comment) (*Comment, *Response, error) {
	apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s/comment", issueID)
	req, err := s.client.NewRequest("POST", apiEndpoint, comment)
	if err != nil {
		return nil, nil, err
	}

	responseComment := new(Comment)
	resp, err := s.client.Do(req, responseComment)
	if err != nil {
		jerr := NewJiraError(resp, err)
		return nil, resp, jerr
	}

	return responseComment, resp, nil
}
18324
def issue(self, issue_instance_id):
        
        with self.db.make_session() as session:
            selected_issue = (
                session.query(IssueInstance)
                .filter(IssueInstance.id == issue_instance_id)
                .scalar()
            )

            if selected_issue is None:
                self.warning(
                    f"Issue {issue_instance_id} doesn't exist. "
                    "Type 'issues' for available issues."
                )
                return

            self.sources = self._get_leaves_issue_instance(
                session, issue_instance_id, SharedTextKind.SOURCE
            )

            self.sinks = self._get_leaves_issue_instance(
                session, issue_instance_id, SharedTextKind.SINK
            )

        self.current_issue_instance_id = int(selected_issue.id)
        self.current_frame_id = -1
        self.current_trace_frame_index = 1  # first one after the source

        print(f"Set issue to {issue_instance_id}.")
        if int(selected_issue.run_id) != self.current_run_id:
            self.current_run_id = int(selected_issue.run_id)
            print(f"Set run to {self.current_run_id}.")
        print()

        self._generate_trace_from_issue()
        self.show()
806187
def add_issue_attribute(self, name, **attrs):
        
        return IssueAttributes(self.requester).create(
            self.id, name, **attrs
        )
822731
public function basic_publish(
        $msg,
        $exchange = '',
        $routing_key = '',
        $mandatory = false,
        $immediate = false,
        $ticket = null
    ) {
        $pkt = new AMQPWriter();
        $pkt->write($this->pre_publish($exchange, $routing_key, $mandatory, $immediate, $ticket));

        try {
            $this->connection->send_content(
                $this->channel_id,
                60,
                0,
                mb_strlen($msg->body, 'ASCII'),
                $msg->serialize_properties(),
                $msg->body,
                $pkt
            );
        } catch (AMQPConnectionClosedException $e) {
            $this->do_close();
            throw $e;
        }

        if ($this->next_delivery_tag > 0) {
            $this->published_messages[$this->next_delivery_tag] = $msg;
            $this->next_delivery_tag = bcadd($this->next_delivery_tag, '1', 0);
        }
    }
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
528714
def comment_issue(self, issue_id, body):
        
        request_url = "{}issue/{}/comment".format(self.create_basic_url(),
                                                  issue_id)

        payload = {'comment': body}

        return_value = self._call_api(request_url,
                                      method='POST', data=payload)

        LOG.debug(return_value)
852210
public function update(string $issue, array $params = [])
    {
        $path = $this->buildIssuesPath($issue);

        return $this->put($path, $params);
    }
1235423
def addcomment(accountable, body):
    

    r = accountable.issue_add_comment(body)
    headers = sorted(['author_name', 'body', 'updated'])
    rows = [[v for k, v in sorted(r.items()) if k in headers]]
    rows.insert(0, headers)
    print_table(SingleTable(rows))
1216652
public function deleteComment($issue, $commentId)
    {
        $path = "/issue/{$issue}/comment/{$commentId}";

        try {
            $this->client->callDelete($path);
        } catch (Exception $e) {
            throw new JiraException("Failed to delete comment", $e);
        }
    }