release.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. import {HealthFixture} from 'sentry-fixture/health';
  2. import type {Health, ReleaseWithHealth} from 'sentry/types/release';
  3. import {ReleaseStatus} from 'sentry/types/release';
  4. export function ReleaseFixture(
  5. params?: Partial<ReleaseWithHealth>,
  6. healthParams?: Health
  7. ): ReleaseWithHealth {
  8. return {
  9. newGroups: 0,
  10. commitCount: 0,
  11. url: '',
  12. data: {},
  13. lastDeploy: {
  14. dateFinished: '',
  15. dateStarted: '',
  16. environment: '',
  17. id: '',
  18. name: '',
  19. url: '',
  20. version: '',
  21. },
  22. deployCount: 0,
  23. shortVersion: '',
  24. fileCount: 0,
  25. status: ReleaseStatus.ACTIVE,
  26. dateCreated: '2020-03-23T01:02:30Z',
  27. dateReleased: '',
  28. id: '',
  29. lastEvent: '2020-03-24T02:04:50Z',
  30. version: 'sentry-android-shop@1.2.0',
  31. firstEvent: '',
  32. lastCommit: {
  33. dateCreated: '',
  34. id: '',
  35. message: null,
  36. releases: [],
  37. },
  38. authors: [],
  39. owner: null,
  40. versionInfo: {
  41. buildHash: null,
  42. version: {
  43. pre: null,
  44. raw: '1.2.0',
  45. major: 1,
  46. minor: 2,
  47. buildCode: null,
  48. patch: 0,
  49. components: 3,
  50. },
  51. description: '1.2.0',
  52. package: 'sentry-android-shop',
  53. },
  54. ref: '',
  55. projects: [
  56. {
  57. healthData: HealthFixture(),
  58. id: 4383603,
  59. name: 'Sentry-Android-Shop',
  60. slug: 'sentry-android-shop',
  61. platform: 'android',
  62. newGroups: 3,
  63. platforms: [],
  64. hasHealthData: true,
  65. ...healthParams,
  66. },
  67. ],
  68. currentProjectMeta: {
  69. nextReleaseVersion: '456',
  70. prevReleaseVersion: '123',
  71. firstReleaseVersion: '0',
  72. lastReleaseVersion: '999',
  73. sessionsUpperBound: null,
  74. sessionsLowerBound: null,
  75. },
  76. adoptionStages: {
  77. 'sentry-android-shop': {
  78. adopted: '2020-03-24T01:02:30Z',
  79. stage: 'replaced',
  80. unadopted: '2020-03-24T02:02:30Z',
  81. },
  82. },
  83. ...params,
  84. };
  85. }