types

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunCreationTriggerType

type RunCreationTriggerType string
const (
	RunCreationTriggerTypeWebhook RunCreationTriggerType = "webhook"
	RunCreationTriggerTypeManual  RunCreationTriggerType = "manual"
)

type RunRefType

type RunRefType string
const (
	RunRefTypeBranch      RunRefType = "branch"
	RunRefTypeTag         RunRefType = "tag"
	RunRefTypePullRequest RunRefType = "pull_request"
)

type RunType

type RunType string
const (
	RunTypeProject RunType = "project"
	RunTypeUser    RunType = "user"
)

type WebhookData

type WebhookData struct {
	Event  WebhookEvent `json:"event,omitempty"`
	SSHURL string       `json:"ssh_url"`

	CompareLink string `json:"compare_link,omitempty"` // Compare link to remote git source
	CommitLink  string `json:"commit_link,omitempty"`  // Commit link to remote git source
	CommitSHA   string `json:"commit_sha,omitempty"`   // commit SHA (SHA1 but also future SHA like SHA256)
	Ref         string `json:"ref,omitempty"`          // Ref containing the commit SHA
	Message     string `json:"message,omitempty"`      // Message to use (Push last commit message summary, PR title, Tag message etc...)
	Sender      string `json:"sender,omitempty"`
	Avatar      string `json:"avatar,omitempty"`

	Branch     string `json:"branch,omitempty"`
	BranchLink string `json:"branch_link,omitempty"`

	Tag     string `json:"tag,omitempty"`
	TagLink string `json:"tag_link,omitempty"`

	// use a string if on some platform (current or future) some PRs id will not be numbers
	PullRequestID   string `json:"pull_request_id,omitempty"`
	PullRequestLink string `json:"link,omitempty"` // Link to pull request
	PRFromSameRepo  bool   `json:"pr_from_same_repo,omitempty"`

	Repo WebhookDataRepo `json:"repo,omitempty"`
}

type WebhookDataRepo

type WebhookDataRepo struct {
	WebURL string `json:"web_url,omitempty"`
	Path   string `json:"path,omitempty"`
}

type WebhookEvent

type WebhookEvent string
const (
	WebhookEventPush        WebhookEvent = "push"
	WebhookEventTag         WebhookEvent = "tag"
	WebhookEventPullRequest WebhookEvent = "pull_request"
)

Jump to

Keyboard shortcuts

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