commitAuthor.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import {User} from 'sentry/types/user';
  2. export function CommitAuthorFixture(params: Partial<User> = {}): User {
  3. return {
  4. username: 'example@sentry.io',
  5. lastLogin: '2018-11-30T21:18:09.812Z',
  6. isSuperuser: true,
  7. isManaged: false,
  8. lastActive: '2018-11-30T21:25:15.222Z',
  9. id: '224288',
  10. isActive: true,
  11. has2fa: false,
  12. name: 'Foo Bar',
  13. isAuthenticated: true,
  14. isStaff: false,
  15. ip_address: '',
  16. avatarUrl: 'https://example.com/avatar.png',
  17. dateJoined: '2018-02-26T23:57:43.766Z',
  18. emails: [
  19. {
  20. is_verified: true,
  21. id: '231605',
  22. email: 'example@sentry.io',
  23. },
  24. ],
  25. avatar: {
  26. avatarUuid: null,
  27. avatarType: 'letter_avatar',
  28. },
  29. hasPasswordAuth: true,
  30. email: 'example@sentry.io',
  31. authenticators: [],
  32. options: {
  33. timezone: 'UTC',
  34. stacktraceOrder: 1,
  35. language: 'en',
  36. clock24Hours: false,
  37. defaultIssueEvent: 'recommended',
  38. avatarType: 'gravatar',
  39. theme: 'light',
  40. prefersIssueDetailsStreamlinedUI: false,
  41. },
  42. permissions: new Set(),
  43. canReset2fa: false,
  44. experiments: [],
  45. flags: {newsletter_consent_prompt: false},
  46. identities: [],
  47. ...params,
  48. };
  49. }