release.tsx 2.0 KB

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