def update_comment_body()

in migration/src/github_issues_util.py [0:0]


def update_comment_body(token: str, repo: str, comment_id: int, body: str, logger: Logger) -> bool:
    url = GITHUB_API_BASE + f"/repos/{repo}/issues/comments/{comment_id}"
    headers = {"Authorization": f"token {token}", "Accept": "application/vnd.github.v3+json"}
    data = {"body": body}
    res = requests.patch(url, headers=headers, json=data)
    time.sleep(INTERVAL_IN_SECONDS)
    if res.status_code != 200:
        logger.error(f"Failed to update comment {comment_id}; status_code={res.status_code}, message={res.text}")
        return False
    return True