ci

package
v0.0.0-...-25a8327 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier is a processor that receives notification from CI system and act to the messages to periodically get elements from github

func New

func New(client *gh.Client, owner string, repo string) *Notifier

New initializes a brand new notifier

func (*Notifier) Process

func (n *Notifier) Process(input string) error

Process gets the json string and acts to these messages from CI system, such as travisCI.

type Webhook

type Webhook struct {
	ID                int    `json:"id"`
	Number            string `json:"number"`
	PullRequestNumber int    `json:"pull_request_number"`
	PullRequestTitle  string `json:"pull_request_title"`
	Duration          int    `json:"duration"`
	AuthorName        string `json:"author_name"`
	AuthorEmail       string `json:"author_email"`
	Type              string `json:"type"`
	State             string `json:"state"`
	BuildURL          string `json:"build_url"`
}

Webhook represents a struct in payload

Jump to

Keyboard shortcuts

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