release.tsx 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import {Health, ReleaseStatus, ReleaseWithHealth} from 'sentry/types';
  2. export function Release(
  3. params: Partial<ReleaseWithHealth>,
  4. healthParams: Health
  5. ): ReleaseWithHealth {
  6. return {
  7. newGroups: 0,
  8. commitCount: 0,
  9. url: '',
  10. data: {},
  11. lastDeploy: {
  12. dateFinished: '',
  13. dateStarted: '',
  14. environment: '',
  15. id: '',
  16. name: '',
  17. url: '',
  18. version: '',
  19. },
  20. deployCount: 0,
  21. shortVersion: '',
  22. fileCount: 0,
  23. status: ReleaseStatus.ACTIVE,
  24. dateCreated: '2020-03-23T01:02:30Z',
  25. dateReleased: '',
  26. id: '',
  27. lastEvent: '2020-03-24T02:04:50Z',
  28. version: 'sentry-android-shop@1.2.0',
  29. firstEvent: '',
  30. lastCommit: {
  31. dateCreated: '',
  32. id: '',
  33. message: null,
  34. releases: [],
  35. },
  36. authors: [],
  37. owner: null,
  38. versionInfo: {
  39. buildHash: null,
  40. version: {
  41. pre: null,
  42. raw: '1.2.0',
  43. major: 1,
  44. minor: 2,
  45. buildCode: null,
  46. patch: 0,
  47. components: 3,
  48. },
  49. description: '1.2.0',
  50. package: 'sentry-android-shop',
  51. },
  52. ref: '',
  53. projects: [
  54. {
  55. healthData: {
  56. totalUsers24h: null,
  57. durationP50: 231,
  58. hasHealthData: true,
  59. sessionsAdoption: 0,
  60. totalProjectSessions24h: 0,
  61. totalProjectUsers24h: 0,
  62. totalSessions24h: 0,
  63. totalSessions: 74949,
  64. totalUsers: 2544,
  65. crashFreeSessions: 99.59839357429719,
  66. sessionsErrored: 301,
  67. crashFreeUsers: 98.07389937106919,
  68. durationP90: 333,
  69. adoption: null,
  70. sessionsCrashed: 301,
  71. stats: {
  72. '24h': [
  73. [1585472400, 0],
  74. [1585476000, 0],
  75. [1585479600, 0],
  76. [1585483200, 0],
  77. [1585486800, 0],
  78. [1585490400, 0],
  79. [1585494000, 0],
  80. [1585497600, 0],
  81. [1585501200, 0],
  82. [1585504800, 0],
  83. [1585508400, 0],
  84. [1585512000, 0],
  85. [1585515600, 0],
  86. [1585519200, 0],
  87. [1585522800, 0],
  88. [1585526400, 0],
  89. [1585530000, 0],
  90. [1585533600, 0],
  91. [1585537200, 0],
  92. [1585540800, 0],
  93. [1585544400, 0],
  94. [1585548000, 0],
  95. [1585551600, 0],
  96. [1585555200, 0],
  97. ],
  98. },
  99. },
  100. id: 4383603,
  101. name: 'Sentry-Android-Shop',
  102. slug: 'sentry-android-shop',
  103. platform: 'android',
  104. newGroups: 3,
  105. platforms: [],
  106. ...healthParams,
  107. },
  108. ],
  109. currentProjectMeta: {
  110. nextReleaseVersion: '456',
  111. prevReleaseVersion: '123',
  112. firstReleaseVersion: '0',
  113. lastReleaseVersion: '999',
  114. sessionsUpperBound: null,
  115. sessionsLowerBound: null,
  116. },
  117. adoptionStages: {
  118. 'sentry-android-shop': {
  119. adopted: '2020-03-24T01:02:30Z',
  120. stage: 'replaced',
  121. unadopted: '2020-03-24T02:02:30Z',
  122. },
  123. },
  124. ...params,
  125. };
  126. }