MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / get_github_pr_url

Method get_github_pr_url

codewiki/cli/git_manager.py:205–226  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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}"

Callers

nothing calls this directly

Calls 1

get_remote_urlMethod · 0.95

Tested by

no test coverage detected