Documentation
¶
Index ¶
- func DetectOrgAndRepo(workDir string) (org, repo string, err error)
- func DetectOrgAndRepoCtx(ctx context.Context, workDir string) (org, repo string, err error)
- func ParseRemoteURL(url string) (org, repo string, err error)
- func ParseRepoName(url string) (string, error)
- func RepoName(ctx context.Context, workDir string) (string, error)
- func URL(ctx context.Context, workDir, remote string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectOrgAndRepo ¶
DetectOrgAndRepo runs git remote get-url origin in workDir and parses the result.
func DetectOrgAndRepoCtx ¶ added in v0.7.189
DetectOrgAndRepoCtx detects the GitHub org and repo in workDir, honouring ctx for cancellation/timeout.
func ParseRemoteURL ¶
ParseRemoteURL extracts org and repo from a GitHub remote URL.
func ParseRepoName ¶ added in v0.7.209
ParseRepoName extracts a repo name from any git remote URL by taking its last path segment and stripping a trailing .git. It handles scp style remotes (git@host:org/repo.git) as well as URLs and local paths.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.