Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitbucketContext ¶
type BitbucketContext struct {
ServerURL string // e.g. "https://bitbucket.example.com"
ProjectKey string // e.g. "PRJ"
RepoSlug string // e.g. "my-repo"
}
BitbucketContext holds the server and repo identity derived from a git remote URL.
func ContextFromCWD ¶
func ContextFromCWD() (*BitbucketContext, error)
ContextFromCWD opens the git repository rooted at (or containing) the current working directory and extracts a BitbucketContext from the "origin" remote. Returns an error if no git repo is found or the remote URL cannot be parsed.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) Clone ¶
func (s *Service) Clone(ctx context.Context, repository *bitbucketclient.RestRepository, targetDir string) error
Clone clones a repository into targetDir.
func (*Service) GetRemotes ¶
GetRemotes returns the remotes of the git repository at path.
Click to show internal directories.
Click to hide internal directories.