travisci

package
v0.0.0-...-c684e27 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: BSD-3-Clause Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TRAVIS_API_URL     = "https://api.travis-ci.org"
	TRAVIS_API_VERSION = "3"

	BUILD_STATE_CREATED = "created"
	BUILD_STATE_PASSED  = "passed"
	BUILD_STATE_FAILED  = "failed"

	FETCH_PULL_REQUESTS_LIMIT = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Id                int    `json:"id"`
	Duration          int    `json:"duration"`
	State             string `json:"state"`
	StartedAt         string `json:"started_at"`
	PullRequestNumber int    `json:"pull_request_number"`
}

type Builds

type Builds struct {
	Builds []*Build `json:"builds"`
}

type TravisCI

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

TravisCI is an object used for iteracting with the Travis CI V3 API. Docs are here: https://docs.travis-ci.com/api/#api-v3

func NewTravisCI

func NewTravisCI(ctx context.Context, repoOwner, repoName, accessToken string) (*TravisCI, error)

NewTravisCI returns a new TravisCI instance.

func (*TravisCI) GetBuildURL

func (t *TravisCI) GetBuildURL(buildID int) string

func (*TravisCI) GetPullRequestBuilds

func (t *TravisCI) GetPullRequestBuilds(pullNumber int, createdBy string) ([]*Build, error)

Jump to

Keyboard shortcuts

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