codeOwner.ts 993 B

123456789101112131415161718192021222324252627282930313233
  1. import {type CodeOwner as TCodeOwner} from 'sentry/types';
  2. import {GitHubIntegration} from './githubIntegration';
  3. import {Project} from './project';
  4. import {Repository} from './repository';
  5. import {RepositoryProjectPathConfig} from './repositoryProjectPathConfig';
  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. }