github

package
v0.0.0-...-cdc9c58 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Github

type Github struct {
	URL    string
	API    string
	Client string
	Secret string
}

Github defines a github remote.

func Load

func Load(client string, secret string) *Github

Load loads the github remote.

func (*Github) EmptyCommit

func (g *Github) EmptyCommit(u *model.User, owner, repo, srcBranch, dstBranch, msg string) error

EmptyCommit creates/adds a new empty commit to a branch of a repo. if srcBranch and dstBranch are different then the commit will include the state of srcbranch effectively rebasing dstBranch onto srcBranch.

func (*Github) GetConfig

func (g *Github) GetConfig(u *model.User, owner, repo, path string) (*pkgconfig.PkgConfig, error)

GetConfig gets and parses the package.yml config file.

func (*Github) Login

func (g *Github) Login(res http.ResponseWriter, req *http.Request) (*model.User, error)

Login authenticates the session and returns the remoter user details.

func (*Github) Perm

func (g *Github) Perm(u *model.User, owner, name string) (*model.Perm, error)

Perm fetches the named repository permissions from the remote system for the specified user.

func (*Github) Repo

func (g *Github) Repo(u *model.User, owner, name string) (*model.Repo, error)

Repo fetches the named repository from the remote system.

func (*Github) SetupBranch

func (g *Github) SetupBranch(u *model.User, owner, repo, srcBranch, dstBranch string) error

SetupBranch sets up a new branch based on srcBranch. If the branch already exists nothing happens.

Jump to

Keyboard shortcuts

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