pkg

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reconcile

func Reconcile(ctx context.Context, repoInfo RepoInformation) (err error)

Reconcile is the main entry of this reconciler

Types

type RepoInformation

type RepoInformation struct {
	Provider string
	Server   string
	Owner    string
	Repo     string
	PrNumber int

	Username, Token string

	Status      string
	Target      string
	Label       string
	Description string
}

type StatusMaker

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

StatusMaker responsible for Pull Requests status creating

func NewStatusMaker

func NewStatusMaker(repo, token string) *StatusMaker

NewStatusMaker creates an instance of statusMaker

func (*StatusMaker) Create

func (s *StatusMaker) Create(ctx context.Context, status scm.State, label, desc string) (err error)

Create creates a generic status

func (*StatusMaker) FindPreviousStatus

func (s *StatusMaker) FindPreviousStatus(ctx context.Context, scmClient *scm.Client, sha, label string) (target *scm.Status, err error)

FindPreviousStatus finds the existing status by sha and label

func (*StatusMaker) WithExpirationCheck

func (s *StatusMaker) WithExpirationCheck(check expirationCheckFunc) *StatusMaker

WithExpirationCheck set the expiration check function

func (*StatusMaker) WithPR

func (s *StatusMaker) WithPR(pr int) *StatusMaker

WithPR sets the pr number

func (*StatusMaker) WithProvider

func (s *StatusMaker) WithProvider(provider string) *StatusMaker

WithProvider sets the Provider

func (*StatusMaker) WithServer

func (s *StatusMaker) WithServer(server string) *StatusMaker

WithServer sets the server

func (*StatusMaker) WithTarget

func (s *StatusMaker) WithTarget(target string) *StatusMaker

WithTarget sets the Target URL

func (*StatusMaker) WithToken

func (s *StatusMaker) WithToken(token string) *StatusMaker

WithToken sets the token

func (*StatusMaker) WithUsername

func (s *StatusMaker) WithUsername(username string) *StatusMaker

WithUsername sets the username

Jump to

Keyboard shortcuts

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