github

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package github implements the scm.Provider contract for GitHub repositories and pull-request workflows.

The package wraps go-github client interactions and maps GitHub-native data structures to shared scm models used by command handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, project string) scm.Provider

New creates a new GitHub provider instance.

Types

type Github

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

Github implements the scm.Provider interface for GitHub.

func (*Github) CheckCapabilities added in v0.11.0

func (g *Github) CheckCapabilities(opts *scm.PROptions) error

CheckCapabilities validates that the provided PR options are supported by GitHub.

func (*Github) GetPullRequest

func (g *Github) GetPullRequest(repo, branch string) (*scm.PullRequest, error)

GetPullRequest retrieves a pull request by repository name and source branch.

func (*Github) ListRepositories

func (g *Github) ListRepositories() ([]*scm.Repository, error)

ListRepositories lists all repositories in the specified project. Supports both organization and user repositories.

func (*Github) MergePullRequest

func (g *Github) MergePullRequest(repo, branch string, opts *scm.PRMergeOptions) (*scm.PullRequest, error)

MergePullRequest merges an existing pull request

func (*Github) OpenPullRequest

func (g *Github) OpenPullRequest(repo, branch string, opts *scm.PROptions) (*scm.PullRequest, error)

OpenPullRequest opens a new pull request in the specified repository.

func (*Github) UpdatePullRequest

func (g *Github) UpdatePullRequest(repo, branch string, opts *scm.PROptions) (*scm.PullRequest, error)

UpdatePullRequest updates an existing pull request.

Jump to

Keyboard shortcuts

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