(pr: dict[str, Any], base_docs_url: str = "https://pr-docs.tlcpack.ai")
| 40 | |
| 41 | |
| 42 | def get_doc_url(pr: dict[str, Any], base_docs_url: str = "https://pr-docs.tlcpack.ai") -> str: |
| 43 | pr_head = pr["commits"]["nodes"][0]["commit"] |
| 44 | target_url = find_target_url(pr_head) |
| 45 | pr_and_build = get_pr_and_build_numbers(target_url) |
| 46 | |
| 47 | commit_sha = pr_head["oid"] |
| 48 | |
| 49 | docs_url = build_docs_url( |
| 50 | base_docs_url, pr_and_build["pr_number"], pr_and_build["build_number"] |
| 51 | ) |
| 52 | |
| 53 | return f"Built docs for commit {commit_sha} can be found [here]({docs_url})." |
no test coverage detected
searching dependent graphs…