Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoName ¶
TODO: this likely won't work for GitLab projects because it assumes that the path is always composed of two elements. GetRepoName takes a URL of the form https://github.com/my-org/my-repo.git and attempts to determine the name of the repo from this, i.e. "my-org/my-repo".
Types ¶
type Repository ¶
Repository represent a Git repository ofa specific Git repository URL
func NewRepository ¶
func NewRepository(rawURL, token string) (*Repository, error)
NewRepository creates a new Git repository object
func (*Repository) CreateWebhook ¶
func (r *Repository) CreateWebhook(listenerURL, secret string) (string, error)
CreateWebhook creates a new webhook in the repository It returns ID of the created webhook
func (*Repository) DeleteWebhooks ¶
func (r *Repository) DeleteWebhooks(ids []string) ([]string, error)
DeleteWebhooks deletes all webhooks that associate with the given listener in this repository
func (*Repository) ListWebhooks ¶
func (r *Repository) ListWebhooks(listenerURL string) ([]string, error)
ListWebhooks returns a list of webhook IDs of the given listener in this repository