codeOwner.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. import {GitHubIntegration} from 'sentry-fixture/githubIntegration';
  2. import {Project} from 'sentry-fixture/project';
  3. import {Repository} from 'sentry-fixture/repository';
  4. import {RepositoryProjectPathConfig} from 'sentry-fixture/repositoryProjectPathConfig';
  5. import {type CodeOwner as TCodeOwner} from 'sentry/types';
  6. export function CodeOwner({
  7. project = Project(),
  8. repo = Repository(),
  9. integration = GitHubIntegration(),
  10. ...params
  11. } = {}): TCodeOwner {
  12. return {
  13. id: '1225',
  14. raw: '',
  15. dateCreated: '2022-11-18T15:05:47.450354Z',
  16. dateUpdated: '2023-02-24T18:43:08.729490Z',
  17. codeMappingId: '11',
  18. provider: 'github',
  19. codeMapping: RepositoryProjectPathConfig({project, repo, integration}),
  20. codeOwnersUrl: 'https://github.com/getsentry/sentry/blob/master/.github/CODEOWNERS',
  21. ownershipSyntax: '',
  22. errors: {
  23. missing_user_emails: [],
  24. missing_external_users: [],
  25. missing_external_teams: [],
  26. teams_without_access: [],
  27. users_without_access: [],
  28. },
  29. ...params,
  30. };
  31. }