pkg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Ping/pong
	Ping = "/ddev-live-ping"

	// Print help message for users calling the command
	Help = "/ddev-live-help"

	// Print help message on PR open, only when applicable
	HelpOnPROpen = "/ddev-live-help-on-pr-open"

	// Create preview site
	PreviewSite = "/ddev-live-preview-site"

	// Delete preview site, always provides verbose response event when no site exists
	DeletePreviewSite = "/ddev-live-delete-preview-site"

	// Close preview site, provides output only in case a preview site existed. This is for PR closing.
	ClosePreviewSite = "/ddev-live-close-preview-site"
)

These strings contain supported `/ddev-live-*` commands in PR/MR comments

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot interface {
	Response(args ResponseRequest) string
	ReceiveUpdate() (UpdateEvent, error)
}

func InitBot

func InitBot(kubeconfig *restclient.Config, annotation string, stopCh <-chan struct{}) (Bot, error)

type PRLock

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

func NewPRLock

func NewPRLock() *PRLock

func (*PRLock) Lock

func (l *PRLock) Lock(repo string, pr int)

func (*PRLock) Unlock

func (l *PRLock) Unlock(repo string, pr int)

type ResponseRequest

type ResponseRequest struct {
	Body         string
	RepoURL      string
	Namespace    string
	OriginBranch string
	CloneBranch  string
	PR           int
	Annotations  map[string]string
}

type UpdateEvent

type UpdateEvent struct {
	Message     string
	PR          int
	RepoURL     string
	Type        string
	Annotations map[string]string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳