github

package
v20.2.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package github provides the forge connector for GitHub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detect

func Detect(remoteURL giturl.Parts) bool

Detect indicates whether the current repository is hosted on a GitHub server.

Types

type Connector

type Connector struct {
	forgedomain.Data
	APIToken Option[configdomain.GitHubToken]
	// contains filtered or unexported fields
}

Connector provides standardized connectivity for the given repository (github.com/owner/repo) via the GitHub API.

func NewConnector

func NewConnector(args NewConnectorArgs) (Connector, error)

NewConnector provides a fully configured GithubConnector instance if the current repo is hosted on GitHub, otherwise nil.

func (Connector) DefaultProposalMessage

func (self Connector) DefaultProposalMessage(data forgedomain.ProposalData) string

func (Connector) FindProposalFn

func (self Connector) FindProposalFn() Option[func(branch, target gitdomain.LocalBranchName) (Option[forgedomain.Proposal], error)]

func (Connector) NewProposalURL

func (self Connector) NewProposalURL(branch, parentBranch, mainBranch gitdomain.LocalBranchName, proposalTitle gitdomain.ProposalTitle, proposalBody gitdomain.ProposalBody) (string, error)

func (Connector) RepositoryURL

func (self Connector) RepositoryURL() string

func (Connector) SearchProposalFn

func (self Connector) SearchProposalFn() Option[func(gitdomain.LocalBranchName) (Option[forgedomain.Proposal], error)]

func (Connector) SquashMergeProposalFn

func (self Connector) SquashMergeProposalFn() Option[func(int, gitdomain.CommitMessage) (err error)]

func (Connector) UpdateProposalSourceFn

func (self Connector) UpdateProposalSourceFn() Option[func(forgedomain.ProposalInterface, gitdomain.LocalBranchName, stringslice.Collector) error]

func (Connector) UpdateProposalTargetFn

func (self Connector) UpdateProposalTargetFn() Option[func(forgedomain.ProposalInterface, gitdomain.LocalBranchName, stringslice.Collector) error]

type NewConnectorArgs

type NewConnectorArgs struct {
	APIToken  Option[configdomain.GitHubToken]
	Log       print.Logger
	RemoteURL giturl.Parts
}

Jump to

Keyboard shortcuts

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