Source: lib/state-info.js

  1. /**
  2. * @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name>
  3. * @license MIT
  4. */
  5. 'use strict';
  6. /** Colors used to output each Travis status.
  7. * From lib/travis/client/states.rb#color.
  8. * @const
  9. * @type {Object<string,boolean>}
  10. */
  11. exports.colors = Object.freeze({
  12. canceled: 'red',
  13. created: 'yellow',
  14. errored: 'red',
  15. failed: 'red',
  16. passed: 'green',
  17. queued: 'yellow',
  18. ready: 'green',
  19. received: 'yellow',
  20. started: 'yellow',
  21. });
  22. /** Statuses which are considered to be pending.
  23. * From lib/travis/client/states.rb#pending?.
  24. * @const
  25. * @type {Object<string,boolean>}
  26. */
  27. exports.isPending = Object.freeze({
  28. created: true,
  29. queued: true,
  30. received: true,
  31. started: true,
  32. });
  33. /** Statuses which are considered to be unsuccessful.
  34. * From lib/travis/client/states.rb#unsuccessful?.
  35. * @const
  36. * @type {Object<string,boolean>}
  37. */
  38. exports.isUnsuccessful = Object.freeze({
  39. canceled: true,
  40. errored: true,
  41. failed: true,
  42. });