github

package
v0.0.0-...-ef0e2bf Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 10 Imported by: 1 module, 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 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