travisci

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisplayName      = "Travis CI"
	HandlerKey       = "travisci"
	MessageDirection = "out"
	MessageBodyType  = models.JSON
)

Variables

This section is empty.

Functions

func ExampleMessage

func ExampleMessage(cfg config.Configuration, data util.ExampleData) (cc.Message, error)

func NewHandler

func NewHandler() handlers.Handler

func Normalize

func Normalize(cfg config.Configuration, hReq handlers.HandlerRequest) (cc.Message, error)

func StatusMessageSuffix

func StatusMessageSuffix(statusMessage string) string

Types

type TravisciOutBuild

type TravisciOutBuild struct {
	ID     int `json:"id,omitempty"`
	Result int `json:"result,omitempty"`
	Status int `json:"status,omitempty"`
}

type TravisciOutConfig

type TravisciOutConfig struct {
	Language      string                   `json:"language,omitempty"`
	Notifications TravisciOutNotifications `json:"notifications,omitempty"`
}

type TravisciOutMessage

type TravisciOutMessage struct {
	ID                int                   `json:"id,omitempty"`
	AuthorEmail       string                `json:"author_email,omitempty"`
	AuthorName        string                `json:"author_name,omitempty"`
	Branch            string                `json:"branch,omitempty"`
	BuildURL          string                `json:"build_url,omitempty"`
	Commit            string                `json:"commit,omitempty"`
	CommitedAt        string                `json:"committed_at,omitempty"`
	CommitterName     string                `json:"committer_name,omitempty"`
	CommitterEmail    string                `json:"committer_email,omitempty"`
	CompareURL        string                `json:"compare_url,omitempty"`
	Config            TravisciOutConfig     `json:"config,omitempty"`
	Duration          int                   `json:"duration,omitempty"`
	FinishedAt        string                `json:"finished_at,omitempty"`
	Matrix            []TravisciOutBuild    `json:"matrix,omitempty"`
	Message           string                `json:"message,omitempty"`
	Number            string                `json:"number,omitempty"`
	PullRequest       bool                  `json:"pull_request,omitempty"`
	PullRequestNumber int                   `json:"pull_request_number,omitempty"`
	PullRequestTitle  string                `json:"pull_request_title,omitempty"`
	Repository        TravisciOutRepository `json:"repository,omitempty"`
	StartedAt         string                `json:"started_at,omitempty"`
	Status            int                   `json:"status"`
	StatusMessage     string                `json:"status_message,omitempty"`
	Type              string                `json:"type,omitempty"`
}

func TravisciOutMessageFromBytes

func TravisciOutMessageFromBytes(bytes []byte) (TravisciOutMessage, error)

func (*TravisciOutMessage) AsMarkdown

func (msg *TravisciOutMessage) AsMarkdown() string

func (*TravisciOutMessage) DurationDisplay

func (msg *TravisciOutMessage) DurationDisplay() string

func (*TravisciOutMessage) PullRequestBuildsAsMarkdown

func (msg *TravisciOutMessage) PullRequestBuildsAsMarkdown() string

func (*TravisciOutMessage) PullRequestURL

func (msg *TravisciOutMessage) PullRequestURL() string

func (*TravisciOutMessage) PushBuildsAsMarkdown

func (msg *TravisciOutMessage) PushBuildsAsMarkdown() string

func (*TravisciOutMessage) ShortCommit

func (msg *TravisciOutMessage) ShortCommit() string

type TravisciOutNotifications

type TravisciOutNotifications struct {
}

can Webhooks can be a string (simple) or a dictionary (secure)

type TravisciOutRepository

type TravisciOutRepository struct {
	ID        int    `json:"id,omitempty"`
	Name      string `json:"name,omitempty"`
	OwnerName string `json:"owner_name,omitempty"`
	URL       string `json:"url,omitempty"`
}

Jump to

Keyboard shortcuts

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