github

package
v1.42.23 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-2-Clause-Patent Imports: 17 Imported by: 27 modules, 32 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

Overview

Package github implements a GitHub client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(uri string) (*scm.Client, error)

New returns a new GitHub API client.

func NewDefault

func NewDefault() *scm.Client

NewDefault returns a new GitHub API client using the default api.github.com address.

Types

type Error

type Error struct {
	Message string `json:"message"`
}

Error represents a Github error.

func (*Error) Error

func (e *Error) Error() string

type RepositoryService added in v1.14.1

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

RepositoryService implements the repository service for the GitHub driver.

func (*RepositoryService) CreateDeployStatus added in v1.14.1

func (s *RepositoryService) CreateDeployStatus(ctx context.Context, repo string, input *scm.DeployStatus) (*scm.DeployStatus, *scm.Response, error)

CreateDeployStatus creates a new deployment status.

func (*RepositoryService) CreateHook added in v1.14.1

func (s *RepositoryService) CreateHook(ctx context.Context, repo string, input *scm.HookInput) (*scm.Hook, *scm.Response, error)

CreateHook creates a new repository webhook.

func (*RepositoryService) CreateStatus added in v1.14.1

func (s *RepositoryService) CreateStatus(ctx context.Context, repo, ref string, input *scm.StatusInput) (*scm.Status, *scm.Response, error)

CreateStatus creates a new commit status.

func (*RepositoryService) DeleteHook added in v1.14.1

func (s *RepositoryService) DeleteHook(ctx context.Context, repo, id string) (*scm.Response, error)

DeleteHook deletes a repository webhook.

func (*RepositoryService) Find added in v1.14.1

Find returns the repository by name.

func (*RepositoryService) FindHook added in v1.14.1

func (s *RepositoryService) FindHook(ctx context.Context, repo string, id string) (*scm.Hook, *scm.Response, error)

FindHook returns a repository hook.

func (*RepositoryService) FindPerms added in v1.14.1

func (s *RepositoryService) FindPerms(ctx context.Context, repo string) (*scm.Perm, *scm.Response, error)

FindPerms returns the repository permissions.

func (*RepositoryService) List added in v1.14.1

List returns the user repository list.

func (*RepositoryService) ListByInstallation added in v1.28.0

func (s *RepositoryService) ListByInstallation(ctx context.Context, opts scm.ListOptions) ([]*scm.Repository, *scm.Response, error)

List returns the github app installation repository list.

func (*RepositoryService) ListHooks added in v1.14.1

func (s *RepositoryService) ListHooks(ctx context.Context, repo string, opts scm.ListOptions) ([]*scm.Hook, *scm.Response, error)

ListHooks returns a list or repository hooks.

func (*RepositoryService) ListNamespace added in v1.38.0

func (s *RepositoryService) ListNamespace(ctx context.Context, namespace string, opts scm.ListOptions) ([]*scm.Repository, *scm.Response, error)

ListNamespace returns the orgs' repository list.

func (*RepositoryService) ListStatus added in v1.14.1

func (s *RepositoryService) ListStatus(ctx context.Context, repo, ref string, opts scm.ListOptions) ([]*scm.Status, *scm.Response, error)

ListStatus returns a list of commit statuses.

func (*RepositoryService) ListV2 added in v1.30.0

ListV2 returns the user repository list based on the searchTerm passed.

func (*RepositoryService) ListWithAffiliation added in v1.40.7

func (s *RepositoryService) ListWithAffiliation(ctx context.Context, opts scm.ListOptions, affiliation string) ([]*scm.Repository, *scm.Response, error)

ListWithAffiliation returns the user repository list filtered by affiliation. affiliation can be: "owner", "collaborator", "organization_member", or comma-separated combinations. Example: "owner,collaborator" returns repos where user is owner or collaborator.

func (*RepositoryService) UpdateHook added in v1.14.1

func (s *RepositoryService) UpdateHook(ctx context.Context, repo, id string, input *scm.HookInput) (*scm.Hook, *scm.Response, error)

UpdateHook updates a repository webhook.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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