github

package
v0.0.0-...-44dc8fe Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client used to call the github api

func New

func New(token string) *Client

New creates a new client

func (*Client) Apply

func (client *Client) Apply(settings *Settings) error

Apply the specified settings to a repository

func (*Client) GetSettingsFromGithub

func (client *Client) GetSettingsFromGithub(owner string, name string) (*Settings, error)

GetSettingsFromGithub returns the settings current applied on a github repository

type Disabled

type Disabled struct {
	Repository bool
	Labels     bool
	Branches   bool
	Webhooks   bool
	Topics     bool
}

Disabled specify if a functionnality sould be disabled

type Settings

type Settings struct {
	Disable    Disabled
	Repository repository
	Labels     []label
	Branches   []branch
	Webhooks   []webhook
	Topics     []string
}

Settings contains the settings to be apply to a github repository

func GetSettingsFromBytes

func GetSettingsFromBytes(content []byte) (*Settings, error)

GetSettingsFromBytes parse byte array containing settings

func GetSettingsFromFile

func GetSettingsFromFile(file string) (*Settings, error)

GetSettingsFromFile parse a yaml file containing settings

Jump to

Keyboard shortcuts

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