travis

package
v2.4.10 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSignature

func ValidateSignature(isPrivateRepo bool, r *http.Request) error

Types

type Repository

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

type Webhook

type Webhook struct {
	ID                int        `json:"id"`
	Number            string     `json:"number"`
	Type              string     `json:"type"`
	State             string     `json:"state"`
	Status            int        `json:"status"` // status and result are the same
	Result            int        `json:"result"`
	StatusMessage     string     `json:"status_message"` // status_message and result_message are the same
	ResultMessage     string     `json:"result_message"`
	StartedAt         time.Time  `json:"started_at"`
	FinishedAt        time.Time  `json:"finished_at"`
	Duration          int        `json:"duration"`
	BuildURL          string     `json:"build_url"`
	CommitID          int        `json:"commit_id"`
	Commit            string     `json:"commit"`
	BaseCommit        string     `json:"base_commit"`
	HeadCommit        string     `json:"head_commit"`
	Branch            string     `json:"branch"`
	Message           string     `json:"message"`
	CompareURL        string     `json:"compare_url"`
	CommittedAt       time.Time  `json:"committed_at"`
	AuthorName        string     `json:"author_name"`
	AuthorEmail       string     `json:"author_email"`
	CommitterName     string     `json:"committer_name"`
	CommitterEmail    string     `json:"committer_email"`
	PullRequest       bool       `json:"pull_request"`
	PullRequestNumber int        `json:"pull_request_number"`
	PullRequestTitle  string     `json:"pull_request_title"`
	Tag               string     `json:"tag"`
	Repository        Repository `json:"repository"`
}

func NewFromRequest

func NewFromRequest(r *http.Request) (*Webhook, error)

func (Webhook) DeploySummary

func (w Webhook) DeploySummary() string

func (Webhook) IsMatch

func (w Webhook) IsMatch(branch string, repo string, owner string) bool

IsMatch make sure the webhook is for you...

func (Webhook) ShouldDeploy

func (w Webhook) ShouldDeploy() bool

Jump to

Keyboard shortcuts

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