Compute expected GitHub Pages URL from repository URL. Args: repo_url: GitHub repository URL repo_name: Repository name Returns: Expected GitHub Pages URL
(repo_url: str, repo_name: str)
| 8 | |
| 9 | |
| 10 | def compute_github_pages_url(repo_url: str, repo_name: str) -> str: |
| 11 | """ |
| 12 | Compute expected GitHub Pages URL from repository URL. |
| 13 | |
| 14 | Args: |
| 15 | repo_url: GitHub repository URL |
| 16 | repo_name: Repository name |
| 17 | |
| 18 | Returns: |
| 19 | Expected GitHub Pages URL |
| 20 | """ |
| 21 | # Extract owner from GitHub URL |
| 22 | # e.g., "https://github.com/owner/repo" -> "owner" |
| 23 | if "github.com" in repo_url: |
| 24 | parts = repo_url.rstrip("/").split("/") |
| 25 | if len(parts) >= 2: |
| 26 | owner = parts[-2] |
| 27 | repo = parts[-1].replace(".git", "") |
| 28 | return f"https://{owner}.github.io/{repo}/" |
| 29 | |
| 30 | return f"https://YOUR_USERNAME.github.io/{repo_name}/" |
| 31 | |
| 32 | |
| 33 | def get_pr_creation_url(repo_url: str, branch_name: str) -> str: |
no outgoing calls
no test coverage detected