def METHOD_NAME(body_text, is_merged):
    """
    Getting the issues url in the PR's body as part of `fixing: <issue>` format.
    Return list of issues found: [{"link": link, "id": issue_id}]
    """
    fixed_jira_issues = re.findall(JIRA_FIXED_ISSUE_REGEX, body_text)
    related_jira_issue = re.findall(JIRA_RELATED_ISSUE_REGEX, body_text)
    logger.info(f"Detected {related_jira_issue=}")
    # If a PR is not merged, we just add the pr link to all the linked issues using Gold.
    # If the PR is merged, we only send issues that should be closed by it.
    # Assuming If the PR was merged, all the related links were fetched when the PR last edited.
    fixed_issue = [
        {"link": link, "id": issue_id, "action": "fixes"}
        for link, issue_id in fixed_jira_issues
    ]
    related_issue = []
    if not is_merged:
        logger.info("Not merging, getting related issues.")
        related_issue = [
            {"link": link, "id": issue_id, "action": "relates"}
            for link, issue_id in related_jira_issue
        ]
    return fixed_issue + related_issue