matrix-org / matrix-hookshot

A bridge between Matrix and multiple project management services, such as GitHub, GitLab and JIRA.
https://matrix-org.github.io/matrix-hookshot/
Apache License 2.0
283 stars 68 forks source link

Title URL issue #825

Open HarHarLinks opened 11 months ago

HarHarLinks commented 11 months ago
{
    "body": "⤵+ [[ID-123]](https://github.com/HarHarLinks/repo/pull/456) #456 for **[HarHarLinks/repo](https://github.com/HarHarLinks/repo)**\n\n **[HarHarLinks](https://github.com/HarHarLinks)**:\n\n > some description",
    "external_url": "https://github.com/HarHarLinks/repo/pull/456",
    "format": "org.matrix.custom.html",
    "formatted_body": "<p>⤵+ [<a href=\"https://my.atlassian.net/browse/ID-123?atlOrigin=someIdHere\">ID-123</a>](https://github.com/HarHarLinks/repo/pull/456) #456 for <strong><a href=\"https://github.com/HarHarLinks/repo\">HarHarLinks/repo</a></strong></p>\n<p><strong><a href=\"https://github.com/HarHarLinks\">HarHarLinks</a></strong>:</p>\n<blockquote>\n<p>some description</p>\n",
    "msgtype": "m.text",
    "uk.half-shot.matrix-hookshot.github.comment": {
      "id": $id
    },
    "uk.half-shot.matrix-hookshot.github.issue": {
      "id": $id,
      "number": 456,
      "title": "[ID-123]",
      "url": "https://github.com/HarHarLinks/repo/pull/456"
    },
    "uk.half-shot.matrix-hookshot.github.repo": {
      "id": $other_id,
      "name": "HarHarLinks/repo",
      "url": "https://github.com/HarHarLinks/repo"
    }
  }

The formatted_body renders as:

[ID-123](https://github.com/HarHarLinks/repo/pull/456)

About which I don't really see where it gets the Jira link (but I might not be able to see that the issue was renamed?) nor do I see how that HTML should have been generated from that markdown.

GitHub (correctly) makes from that markdown:

[ID-123]