Hyperlink is not updating with comment.it was not displaying as actual link

I am trying to update my hyperlink with jira issue .but it shows [Link Text|URL] instead of an actual hyperlink.
my code

const commentBody = `Testing comment.For more details, check out [Click here|https://identifyyou.atlassian.net/browse/TEST-1]`;
       var commentData = {
      "body": {
        "content": [
          {
            "content": [
              {
                "text": commentBody,
                "type": "text"
              }
            ],
            "type": "paragraph"
          }
        ],
        "type": "doc",
        "version": 1
      }
    };
    
    try {
      const response = await api.asApp().requestJira(route`/rest/api/3/issue/10206/comment`, {
        method: 'POST',
        headers: {
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify(commentData)
      });
    
      const responseBody = await response.text(); 
      // console.log('Raw response body:', responseBody);
    
      if (response.ok) {
        const data = JSON.parse(responseBody);
         console.log('Comment successfully added:', data);
      } else {
        console.error('Failed to add comment, status code:', response.status, 'response:', responseBody);
      }
    } catch (error) {
      console.error('Error adding comment:', error);
    }

Hello @Dhurgeswari

Refer to the Mark - Link documentation on how to use the link mark to set hyperlinks within a text node in ADF.

thank you @sunnyape .its work fine for me.but little bit more clarification on this
Now my request.

  var commentData = `{
    "body": {
      "content": [
        {
          "content": [
            {
              "text": "This ticket is merged using the our app The primary Issue is ${primaryIssueKey}.click here more information" ,
              "type": "text",
              "marks": [
                {
                  "type": "link",
                  "attrs": {
                    "href": "https://identifyyou.atlassian.net/browse/${primaryIssueKey.replace(" ","-")}",
                    "title": "Issue "
                  }
                }
              ]
            }
          ],
          "type": "paragraph"
        }
      ],
      "type": "doc",
      "version": 1
    }
  }`;

here my whole text converted into link.But i need specific part will be change as link.what i do now.please make your response ASAP

Hello @Dhurgeswari

I suggest that you use the Document Builder and Document Viewer tools that are provided as part of the ADF documentation to learn for yourself how ADF works.

  1. The Document Builder allows you supply styled text, then see what the resulting ADF will be.

  2. The Document Viewer allows you to supply ADF, then see how it will be rendered as styled text

Have fun on your learning journey.