{"id":17109262,"url":"https://github.com/kevinoid/travis-status","last_synced_at":"2025-06-11T14:13:00.464Z","repository":{"id":6288600,"uuid":"54599680","full_name":"kevinoid/travis-status","owner":"kevinoid","description":"An implementation of the status subcommand of The Travis Client in Node.js, with a few extra features.","archived":false,"fork":false,"pushed_at":"2025-02-17T02:23:03.000Z","size":1174,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-16T21:38:47.877Z","etag":null,"topics":["cli","continuous-integration","nodejs","travis-ci","travis-status"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinoid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-23T23:18:41.000Z","updated_at":"2024-11-15T15:01:59.000Z","dependencies_parsed_at":"2023-10-03T03:57:30.271Z","dependency_job_id":"65972cd8-a2af-4c3c-b941-e755b533b135","html_url":"https://github.com/kevinoid/travis-status","commit_stats":{"total_commits":521,"total_committers":5,"mean_commits":104.2,"dds":0.1113243761996161,"last_synced_commit":"94010c0d3f29c8e8816b3799495337a67a0317c4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinoid%2Ftravis-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinoid%2Ftravis-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinoid%2Ftravis-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinoid%2Ftravis-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinoid","download_url":"https://codeload.github.com/kevinoid/travis-status/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinoid%2Ftravis-status/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259280319,"owners_count":22833424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","continuous-integration","nodejs","travis-ci","travis-status"],"created_at":"2024-10-14T16:22:42.995Z","updated_at":"2025-06-11T14:13:00.425Z","avatar_url":"https://github.com/kevinoid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Travis Status (for Node.js)\n===========================\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/kevinoid/travis-status/node.js.yml?branch=main\u0026style=flat\u0026label=build)](https://github.com/kevinoid/travis-status/actions?query=branch%3Amain)\n[![Coverage](https://img.shields.io/codecov/c/github/kevinoid/travis-status/main.svg?style=flat)](https://app.codecov.io/gh/kevinoid/travis-status/branch/main)\n[![Dependency Status](https://img.shields.io/librariesio/release/npm/travis-status.svg?style=flat)](https://libraries.io/npm/travis-status)\n[![Supported Node Version](https://img.shields.io/node/v/travis-status.svg?style=flat)](https://www.npmjs.com/package/travis-status)\n[![Version on NPM](https://img.shields.io/npm/v/travis-status.svg?style=flat)](https://www.npmjs.com/package/travis-status)\n\nThis project is an implementation of the `status` subcommand of [The Travis\nClient](https://github.com/travis-ci/travis.rb) in\n[Node.js](https://nodejs.org/), with a few extra features.\n\n## Introductory Example\n\n    $ npm install -g travis-status\n    $ travis-status\n    build #42 passed\n\n## Features\n\n* It is a drop-in replacement for [`travis\n  status`](https://github.com/travis-ci/travis.rb#status).  Any differences in\n  behavior are considered issues and users are encouraged to report them.\n* It can be installed using [npm](https://www.npmjs.com/).  This is the major\n  feature which spurred development of this module (it is a clone after all).\n  It makes development environment setup easier and use in npm scripts (such\n  as [`version`](https://docs.npmjs.com/cli/version)) both easier and\n  version-managed.\n* It adds the `--branch` option to query the status of a branch, rather than\n  the most recent build for the repo.\n* It adds the `--commit` option to ensure the status of the repo (or branch)\n  resulted from a build of a particular commit.\n* It adds the `--wait` option to wait for a pending build to complete within a\n  given time interval.\n\n## Installation\n\n[This package](https://www.npmjs.com/package/travis-status) can be\ninstalled using [npm](https://www.npmjs.com/), either globally or locally, by\nrunning:\n\n```sh\nnpm install travis-status\n```\n\n## Recipes\n\n### Check branch status and commit\n\nTo check the status of a named branch and confirm that it matches a named\ncommit (named by tag, branch, or sha1):\n\n```sh\ntravis-status --branch release --commit v2.0.1\n```\n\n### Check repo is passing, not pending\n\nAlthough `travis-status` defaults to checking the status of the repository in\nwhich it is run, it can check other repositories using the `--repo` option.\nThe `--fail-pending` option can be used to cause non-0 exit for pending\nstatus:\n\n```sh\ntravis-status --repo kevinoid/travis-status --fail-pending || echo 'Not yet passing'\n```\n\n### Check status before release\n\nTo check that the build for the current commit is passing before releasing it\nas a new version, add the following to `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"preversion\": \"travis-status -c -qxw\"\n  }\n}\n```\n\nThis will check that the Travis CI status for the current repository is\npassing (and will wait if pending), that it matches the current commit, then\nexits quietly if passing or prints an error and exits with non-0 exit code if\nnot.\n\n### Check status using Pro API\n\nTo use the Travis CI Pro API with an access token stored in an environment\nvariable:\n\n```sh\ntravis-status --pro --token \"$TRAVIS_TOKEN\"\n```\n\n### Use from JavaScript\n\nThe `travis-status` module can be used to retrieve information from the Travis\nCI API as follows:\n\n```js\nvar travisStatus = require('travis-status');\n// Note:  Most options match camelized command-line option names\nvar options = {\n  branch: 'master',\n  wait: 60000\n};\ntravisStatus(options).then(function(apiObject) {\n  console.log(apiObject);\n});\n```\n\nIf the calling code already knows the relevant git information (e.g. repo\nname, branch name, commit hash), it is recommended to use the\n[`travis-ci`](https://github.com/pwmckenna/node-travis-ci) module directly\n(and consult [`lib/travis-status-http.js`](lib/travis-status-http.js) for an\nexample of how to use a more recent version of\n[`request`](https://github.com/request/request) to enable gzip, proxy, and/or\nHTTP keep-alive support where appropriate).\n\n### Use interactively from JavaScript\n\nTo prompt the user for input (to confirm and store the repo name) set the\n`interactive` option to `true`:\n\n```js\nvar stream = require('stream');\nvar travisStatus = require('travis-status');\nvar options = {\n  // Prompt the user for input\n  interactive: true,\n  // Redirect input/output streams (defaults to process.stdin, stdout, stderr)\n  in: new stream.PassThrough(),\n  out: new stream.PassThrough(),\n  err: new stream.PassThrough()\n};\ntravisStatus(options).then(function(apiObject) {\n  console.log(apiObject);\n});\n// read prompts from options.err, respond on options.in\n```\n\n### Emulate command-line from JavaScript\n\nTo call the module using command-line arguments, require\n`travis-status/bin/travis-status`:\n\n```js\nvar stream = require('stream');\nvar travisStatusCmd = require('travis-status/bin/travis-status');\nvar options = {\n  // Redirect input/output streams (defaults to process.stdin, stdout, stderr)\n  in: new stream.PassThrough(),\n  out: new stream.PassThrough(),\n  err: new stream.PassThrough()\n};\ntravisStatusCmd(['node', 'travis-status', '--quiet'], options, function(err, exitCode) {\n  if (err) { console.error(err); }\n  process.exit(exitCode);\n});\n// read prompts from options.err, respond on options.in\n```\n\nMore examples can be found in the [test\nspecifications](https://kevinoid.github.io/travis-status/spec).\n\n## API Docs\n\nCommand-line usage information is available via `--help`:\n\n```sh\ntravis-status --help\n```\n\nTo use this module as a library, see the [API\nDocumentation](https://kevinoid.github.io/travis-status/api).\n\n## Contributing\n\nContributions are appreciated.  Contributors agree to abide by the [Contributor\nCovenant Code of\nConduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html).\nIf this is your first time contributing to a Free and Open Source Software\nproject, consider reading [How to Contribute to Open\nSource](https://opensource.guide/how-to-contribute/)\nin the Open Source Guides.\n\nIf the desired change is large, complex, backwards-incompatible, can have\nsignificantly differing implementations, or may not be in scope for this\nproject, opening an issue before writing the code can avoid frustration and\nsave a lot of time and effort.\n\n## License\n\nThis project is available under the terms of the [MIT License](LICENSE.txt).\nSee the [summary at TLDRLegal](https://tldrlegal.com/license/mit-license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinoid%2Ftravis-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinoid%2Ftravis-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinoid%2Ftravis-status/lists"}