// resourceCommentCreate creates a new jira comment using the jira api
resourceCommentCreate creates a new jira comment using the jira api
// resourceCommentCreate creates a new jira comment using the jira api
func resourceCommentCreate(d *schema.ResourceData, m interface{}) error {
	config := m.(*Config)
	body := d.Get("body").(string)
	issueKey := d.Get("issue_key").(string)
	c := jira.Comment{Body: body}
	comment, res, err := config.jiraClient.Issue.AddComment(issueKey, &c)
	if err != nil {
		body, _ := ioutil.ReadAll(res.Body)
		return errors.Wrapf(err, "creating jira issue failed: %s", body)
	}
	d.SetId(comment.ID)
	return resourceCommentRead(d, m)
}
func resourceCommentCreate ( d * schema . ResourceData , m interface { } ) error { config := m . ( * Config ) body := d . Get ( " " ) . ( string ) issueKey := d . Get ( " " ) . ( string ) c := jira . Comment { Body : body } comment , res , err := config . jiraClient . Issue . AddComment ( issueKey , & c ) if err != nil { body , _ := ioutil . ReadAll ( res . Body ) return errors . Wrapf ( err , " " , body ) } d . SetId ( comment . ID ) return resourceCommentRead ( d , m ) }
resourceCommentCreate creates a new jira comment using the jira api
resourceCommentCreate creates a new jira comment using the jira api