gitea

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInterface

type ClientInterface interface {
	CreateIssueComment(owner, repo string, index int64, opt gitea.CreateIssueCommentOption) (*gitea.Comment, *gitea.Response, error)
	CreateStatus(owner, repo, sha string, opts gitea.CreateStatusOption) (*gitea.Status, *gitea.Response, error)
	GetPullRequest(owner, repo string, index int64) (*gitea.PullRequest, *gitea.Response, error)
}

type GiteaSdk

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

func New

func New[T ClientInterface](configuration *settings.GiteaConfig, newClient func(url string, options ...gitea.ClientOption) (T, error)) *GiteaSdk

func (*GiteaSdk) DetermineHEAD

func (sdk *GiteaSdk) DetermineHEAD(repo settings.GiteaRepository, idx int64) (string, error)

func (*GiteaSdk) PostComment

func (sdk *GiteaSdk) PostComment(repo settings.GiteaRepository, idx int, msg string) error

func (*GiteaSdk) UpdateStatus

func (sdk *GiteaSdk) UpdateStatus(project settings.Project, ref string, details StatusDetails) error

type GiteaSdkInterface

type GiteaSdkInterface interface {
	PostComment(settings.GiteaRepository, int, string) error
	UpdateStatus(settings.Project, string, StatusDetails) error
	DetermineHEAD(settings.GiteaRepository, int64) (string, error)
}

type State

type State gitea.StatusState
const (
	StatusOK      State = State(gitea.StatusSuccess)
	StatusPending State = State(gitea.StatusPending)
	StatusFailure State = State(gitea.StatusFailure)
)

type StatusDetails

type StatusDetails struct {
	Url     string
	Message string
	State   State
}

Jump to

Keyboard shortcuts

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