find_web_url¶
This module implements the logic to find the corresponding web url of a local file in a local git repo.
Basically, it locate the .git/config file, extract the remote origin url,
parse it, and then generate the web url.
- git_web_url.find_web_url.get_web_url(path: ~pathlib.Path, branch: str | ~git_web_url.find_web_url._CurrentBranch | ~git_web_url.find_web_url._DefaultBranch = <git_web_url.find_web_url._CurrentBranch object>)[source]¶
This module implements the logic to find the corresponding web url of a local file in a local git repo.
- Parameters:
path – The local file or directory path.
branch – The branch to use in the URL. - CURRENT_BRANCH: use current branch (default behavior) - DEFAULT_BRANCH: use the default branch (URL without explicit branch) - str: use the specified branch name