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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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