github

package
v0.0.0-...-0762dd7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HooksMatches

func HooksMatches(hook api.Hook, githubHook github.Hook) bool

HooksMatches checks if the given GitHub hook is the same as the current OpenShift hook

func NewGithubHook

func NewGithubHook(hook api.Hook) *github.Hook

NewGithubHook returns a GitHub representation of a hook GitHub hook refenrence: https://developer.github.com/v3/repos/hooks/#parameters

Types

type HooksManager

type HooksManager struct {
	// contains filtered or unexported fields
}

HooksManager provides an easy way to manage GitHub hooks

func NewHooksManager

func NewHooksManager(baseURL, token string, insecureSkipVerify bool) (*HooksManager, error)

NewHooksManager instantiates a HooksManager using the given GitHub base URL and access token (you can leave the baseURL empty to use the default api.github.com endpoint)

func (*HooksManager) DeleteHook

func (gh *HooksManager) DeleteHook(hook api.Hook) (bool, error)

DeleteHook deletes the given hook returns true if the hook has been deleted

func (*HooksManager) ListHooksForOrganization

func (gh *HooksManager) ListHooksForOrganization(org string) ([]api.Hook, error)

ListHooksForOrganization returns all the hooks for all the repositories in given github organization

func (*HooksManager) ListHooksForRepository

func (gh *HooksManager) ListHooksForRepository(repository api.GithubRepository) ([]api.Hook, error)

ListHooksForRepository returns all the hooks for the given github repository

func (*HooksManager) RegisterHook

func (gh *HooksManager) RegisterHook(hook api.Hook) (bool, error)

RegisterHook registers the given hook (only if the hook does not already exists) returns true if the hook has been created

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL