activityFeed.tsx 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. },
  54. flags: {newsletter_consent_prompt: false},
  55. avatar: {avatarUuid: null, avatarType: 'letter_avatar'},
  56. hasPasswordAuth: true,
  57. email: 'billy@sentry.io',
  58. }),
  59. type: GroupActivityType.NOTE,
  60. issue: {
  61. platform: 'javascript',
  62. lastSeen: '2019-04-26T16:34:12.288Z',
  63. numComments: 3,
  64. userCount: 1,
  65. culprit: '/organizations/:orgId/issues/:groupId/feedback/',
  66. title: 'Error: user efedback',
  67. id: '524',
  68. assignedTo: {
  69. id: '1',
  70. name: 'actor',
  71. type: 'user',
  72. },
  73. issueCategory: IssueCategory.ERROR,
  74. issueType: IssueType.ERROR,
  75. participants: [],
  76. latestEvent: TestStubs.Event(),
  77. isUnhandled: true,
  78. pluginActions: [],
  79. pluginContexts: [],
  80. seenBy: [],
  81. filtered: null,
  82. pluginIssues: [],
  83. // there is a nasty type issue here where "reprocessing" cannot be assigned to
  84. // resolution status | "reprocessing" and "reprocessing" cannot be assigned to resolution
  85. // status (fails even if I as const it).
  86. // @ts-expect-error
  87. status: 'reprocessing',
  88. activity: [],
  89. logger: 'critical',
  90. type: EventOrGroupType.ERROR,
  91. annotations: [],
  92. metadata: {type: 'Error', value: 'user feedback', filename: '<anonymous>'},
  93. subscriptionDetails: {reason: 'commented'},
  94. isPublic: false,
  95. hasSeen: true,
  96. shortId: 'INTERNAL-DW',
  97. shareId: '99',
  98. firstSeen: '2019-04-26T16:34:12.288Z',
  99. count: '1',
  100. permalink: 'http://localhost:8000/organizations/sentry/issues/524/?project=1',
  101. level: 'error',
  102. isSubscribed: true,
  103. isBookmarked: false,
  104. project: TestStubs.Project({
  105. platform: undefined,
  106. slug: 'internal',
  107. id: '1',
  108. name: 'Internal',
  109. }),
  110. },
  111. id: '48',
  112. ...params,
  113. };
  114. }