vcsutils

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken() string

CreateToken create a random UUID

func DiscardResponseBody added in v1.1.0

func DiscardResponseBody(resp *http.Response) error

DiscardResponseBody prepare http response body for closing

func Untar

func Untar(destDir string, reader io.Reader, shouldRemoveBaseDir bool) error

Untar a file to the given destination destDir - Destination folder reader - Reader for the tar.gz file shouldRemoveBaseDir - True if should remove the base directory

Types

type VcsProvider

type VcsProvider int

VcsProvider is an enum represents the VCS provider type

const (
	// GitHub VCS provider
	GitHub VcsProvider = iota
	// GitLab VCS provider
	GitLab
	// BitbucketServer VCS provider
	BitbucketServer
	// BitbucketCloud VCS provider
	BitbucketCloud
)

func (VcsProvider) String added in v1.1.0

func (v VcsProvider) String() string

String representation of the VcsProvider

type WebhookEvent

type WebhookEvent string

WebhookEvent is the event type of the incoming webhook

const (
	// PrRejected the pull request is rejected
	PrRejected WebhookEvent = "PrRejected"
	// PrEdited the pull request is edited
	PrEdited WebhookEvent = "PrEdited"
	// PrMerged the pull request is merged
	PrMerged WebhookEvent = "PrMerged"
	// PrOpened a pull request is opened
	PrOpened WebhookEvent = "PrOpened"
	// Push a commit is pushed to the source branch
	Push WebhookEvent = "Push"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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