Module: appveyor-status

Classes

AmbiguousProjectError
CommitMismatchError

Methods

(static) getLastBuild(optionsopt, nullable, callbackopt, nullable) → {!Promise.<!appveyorSwagger.ProjectBuild>|undefined}

Gets the last AppVeyor build for a repo/branch. Errors include module:appveyor-status.AmbiguousProjectError if an AppVeyor project was not uniquely matched by options and module:appveyor-status.CommitMismatchError if commitId in the last build did not match the hash of options.commit.
Parameters:
Name Type Attributes Description
options module:appveyor-status.AppveyorStatusOptions <optional>
<nullable>
Options.
callback function <optional>
<nullable>
Callback function called with the last build from the AppVeyor 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 AppVeyor API, or Error if it could not be retrieved. Otherwise undefined.
Type
!Promise.<!appveyorSwagger.ProjectBuild> | undefined

(static) getStatus(optionsopt, nullable, callbackopt, nullable) → {!Promise.<string>|undefined}

Gets the current AppVeyor status of a repo/branch. Errors include module:appveyor-status.AmbiguousProjectError if an AppVeyor project was not uniquely matched by options and module:appveyor-status.CommitMismatchError if commitId in the last build did not match the hash of options.commit.
Parameters:
Name Type Attributes Description
options module:appveyor-status.AppveyorStatusOptions <optional>
<nullable>
Options.
callback function <optional>
<nullable>
Callback function called with the current build status from the AppVeyor API, or an Error if it could not be retrieved.
Source:
Returns:
If callback is not given, a Promise with the current build status from the AppVeyor API, or Error if it could not be retrieved. Otherwise undefined.
Type
!Promise.<string> | undefined

(static) getStatusBadge(optionsopt, nullable, callbackopt, nullable) → {!Promise.<string>|undefined}

Gets the AppVeyor status badge for a repo/branch.
Parameters:
Name Type Attributes Description
options module:appveyor-status.AppveyorStatusOptions <optional>
<nullable>
Options. module:appveyor-status.AppveyorStatusOptions.commit and module:appveyor-status.AppveyorStatusOptions.project} are not supported by this function.
callback function <optional>
<nullable>
Callback function called with the SVG status badge from the AppVeyor API, or an Error if it could not be retrieved.
Source:
Returns:
If callback is not given, a Promise with the current SVG status badge (as a string) from the AppVeyor API, or Error if it could not be retrieved. Otherwise undefined.
Type
!Promise.<string> | undefined

Type Definitions

AppveyorStatusOptions

Options for appveyorStatus functions.
Type:
  • Object
Properties:
Name Type Attributes Description
agent module:http.Agent <optional>
Agent to use for HTTP requests (useful for inter-call keep-alive and request sharing) (ignored if appveyorClient is set).
appveyorClient SwaggerClient | Promise.<SwaggerClient> <optional>
client used to query the AppVeyor API.
branch string | boolean <optional>
query latest build for named branch, or the current branch
commit string <optional>
require build to be for a specific commit. Named commits are resolved in options.repo or current dir. (requires token or project)
err module:stream.Writable <optional>
Stream to which errors (and non-output status messages) are written. (default: process.stderr)
project string | appveyorSwagger.Project <optional>
AppVeyor project to query (default: auto-detect) (exclusive with repo, statusBadgeId, and webhookId)
repo string <optional>
repository to query (as {bitbucket,github}/$user/$proj) (default: auto-detect) (exclusive with project, statusBadgeId, and webhookId)
statusBadgeId string <optional>
Status badge ID to query (exclusive with project, repo, and webhookId)
token string <optional>
AppVeyor API access token.
verbosity number <optional>
Amount of diagnostic information to print (0 is default, larger yields more output).
wait number <optional>
Length of time to wait (in milliseconds) for build to complete. If wait time is reached, incomplete build is returned. (default: no polling)
webhookId string <optional>
*Deprecated* Webhook ID to query. The webhookId has been replaced by statusBadgeId as the path parameter in the status badge URL. This name is kept for backwards-compatibility only. (default: auto-detect) (exclusive with project, statusBadgeId, and repo)
Source: