Global

Members

(constant) colors :Object.<string, boolean>

Colors used to output each Travis status. From lib/travis/client/states.rb#color.
Type:
  • Object.<string, boolean>
Source:

(constant) isPending :Object.<string, boolean>

Statuses which are considered to be pending. From lib/travis/client/states.rb#pending?.
Type:
  • Object.<string, boolean>
Source:

(constant) isUnsuccessful :Object.<string, boolean>

Statuses which are considered to be unsuccessful. From lib/travis/client/states.rb#unsuccessful?.
Type:
  • Object.<string, boolean>
Source:

Methods

checkBuildCommit(buildnon-null, localCommitnon-null) → (non-null) {Object}

Checks that a build has an expected commit hash.
Parameters:
Name Type Description
build Object Build (or branch) object returned by the Travis CI API.
localCommit Object Expected commit information.
Source:
Throws:
AssertionError If build.commit.sha is not equal to expected.
Returns:
build
Type
Object

travisStatus(optionsopt, nullable, callbackopt, nullable) → {!Promise.<!Object>|undefined}

Gets the current Travis CI status of a repo/branch.
Parameters:
Name Type Attributes Description
options TravisStatusOptions <optional>
<nullable>
Options.
callback function <optional>
<nullable>
Callback function called with the current build information from the Travis CI API, or an Error if it could not be retrieved.
Source:
Returns:
If callback is not given, a Promise with the current build information from the Travis CI API, or Error if it could not be retrieved. Otherwise undefined.
Type
!Promise.<!Object> | undefined

travisStatusCmd(argsnon-null, optionsopt, callbackopt, nullable) → {Promise.<number>|undefined}

Entry point for this command.
Parameters:
Name Type Attributes Description
args Array.<string> Command-line arguments.
options CommandOptions <optional>
Options.
callback function <optional>
<nullable>
Callback for the exit code or an Error.
Source:
Returns:
If callback is not given, a Promise with the exit code or Error.
Type
Promise.<number> | undefined

TravisStatusHttp(endpointopt, optionsopt)

Creates an instance of the travis-ci HTTP agent with a given endpoint and request options. This class has the following features above TravisHttp: - Uses a newer version of request (for gzip and proxy support) - Supports caller-specified API endpoints (e.g. for enterprise or local use) - Supports caller-specified request options (e.g. pooling, strictSSL, proxy, tunnel, timeouts, etc.) - Improved error values which are real Error instances and include the HTTP response information, regardless of content.
Parameters:
Name Type Attributes Description
endpoint string <optional>
Travis CI API endpoint (base URL). (default: TravisStatusChecker.ORG_URI)
options Object <optional>
Options to pass to the request constructor.
Source:

trimSlash(string) → {ArgType}

Trims a single slash from the end of a string, if present. @ template ArgType
Parameters:
Name Type Description
string ArgType String to trim.
Source:
Returns:
If string is a string which ends with '/', string with the last character removed. Otherwise, string unmodified. @ nosideeffects
Type
ArgType