Get GitHub PR creation URL for a branch. Args: branch_name: Branch name Returns: PR URL or None if not a GitHub repo
(self, branch_name: str)
| 203 | |
| 204 | Args: |
| 205 | branch_name: Branch name |
| 206 | |
| 207 | Returns: |
| 208 | PR URL or None if not a GitHub repo |
| 209 | """ |
| 210 | remote_url = self.get_remote_url() |
| 211 | if not remote_url or "github.com" not in remote_url: |
| 212 | return None |
| 213 | |
| 214 | # Clean URL |
| 215 | base_url = remote_url.rstrip("/").replace(".git", "") |
| 216 | |
| 217 | # Convert SSH to HTTPS |
| 218 | if base_url.startswith("git@github.com:"): |
| 219 | base_url = base_url.replace("git@github.com:", "https://github.com/") |
| 220 | |
| 221 | return f"{base_url}/compare/{branch_name}" |
nothing calls this directly
no test coverage detected