release.tsx 1.9 KB

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