activityFeed.tsx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import {
  2. type Activity,
  3. EventOrGroupType,
  4. GroupActivityType,
  5. IssueCategory,
  6. IssueType,
  7. } from 'sentry/types';
  8. export function ActivityFeed(params: Partial<Activity> = {}): Activity {
  9. return {
  10. data: {text: 'Very interesting comment'},
  11. dateCreated: '2019-04-29T21:43:32.280Z',
  12. project: TestStubs.Project({
  13. features: [
  14. 'releases',
  15. 'sample-events',
  16. 'minidump',
  17. 'rate-limits',
  18. 'similarity-indexing',
  19. 'similarity-view',
  20. 'data-forwarding',
  21. ],
  22. isInternal: true,
  23. dateCreated: '2019-03-09T06:52:19.832Z',
  24. id: '1',
  25. slug: 'internal',
  26. name: 'Internal',
  27. hasAccess: true,
  28. isBookmarked: false,
  29. platform: undefined,
  30. firstEvent: '2019-03-09T06:56:15Z',
  31. isMember: true,
  32. }),
  33. user: TestStubs.User({
  34. username: 'billy@sentry.io',
  35. lastLogin: '2019-04-23T00:10:19.787Z',
  36. isSuperuser: true,
  37. emails: [{is_verified: false, id: '1', email: 'billy@sentry.io'}],
  38. isManaged: false,
  39. lastActive: '2019-04-30T01:39:05.659Z',
  40. identities: [],
  41. id: '1',
  42. isActive: true,
  43. has2fa: false,
  44. name: 'billy@sentry.io',
  45. avatarUrl:
  46. 'https://secure.gravatar.com/avatar/7b544e8eb9d08ed777be5aa82121155a?s=32&d=mm',
  47. dateJoined: '2019-03-09T06:52:42.836Z',
  48. options: {
  49. timezone: 'America/Los_Angeles',
  50. stacktraceOrder: -1,
  51. language: 'en',
  52. clock24Hours: false,
  53. defaultIssueEvent: 'recommended',
  54. },
  55. flags: {newsletter_consent_prompt: false},
  56. avatar: {avatarUuid: null, avatarType: 'letter_avatar'},
  57. hasPasswordAuth: true,
  58. email: 'billy@sentry.io',
  59. }),
  60. type: GroupActivityType.NOTE,
  61. issue: {
  62. platform: 'javascript',
  63. lastSeen: '2019-04-26T16:34:12.288Z',
  64. numComments: 3,
  65. userCount: 1,
  66. culprit: '/organizations/:orgId/issues/:groupId/feedback/',
  67. title: 'Error: user efedback',
  68. id: '524',
  69. assignedTo: {
  70. id: '1',
  71. name: 'actor',
  72. type: 'user',
  73. },
  74. issueCategory: IssueCategory.ERROR,
  75. issueType: IssueType.ERROR,
  76. participants: [],
  77. latestEvent: TestStubs.Event(),
  78. isUnhandled: true,
  79. pluginActions: [],
  80. pluginContexts: [],
  81. seenBy: [],
  82. filtered: null,
  83. pluginIssues: [],
  84. // there is a nasty type issue here where "reprocessing" cannot be assigned to
  85. // resolution status | "reprocessing" and "reprocessing" cannot be assigned to resolution
  86. // status (fails even if I as const it).
  87. // @ts-expect-error
  88. status: 'reprocessing',
  89. activity: [],
  90. logger: 'critical',
  91. type: EventOrGroupType.ERROR,
  92. annotations: [],
  93. metadata: {type: 'Error', value: 'user feedback', filename: '<anonymous>'},
  94. subscriptionDetails: {reason: 'commented'},
  95. isPublic: false,
  96. hasSeen: true,
  97. shortId: 'INTERNAL-DW',
  98. shareId: '99',
  99. firstSeen: '2019-04-26T16:34:12.288Z',
  100. count: '1',
  101. permalink: 'http://localhost:8000/organizations/sentry/issues/524/?project=1',
  102. level: 'error',
  103. isSubscribed: true,
  104. isBookmarked: false,
  105. project: TestStubs.Project({
  106. platform: undefined,
  107. slug: 'internal',
  108. id: '1',
  109. name: 'Internal',
  110. }),
  111. },
  112. id: '48',
  113. ...params,
  114. };
  115. }