autofixRootCauseData.ts 639 B

12345678910111213141516171819202122
  1. import type { AutofixRootCauseData } from 'sentry/components/events/autofix/types';
  2. export function AutofixRootCauseData(
  3. params: Partial<AutofixRootCauseData> = {}
  4. ): AutofixRootCauseData {
  5. return {
  6. id: '100',
  7. root_cause_reproduction: [
  8. {
  9. code_snippet_and_analysis: 'This is the code snippet and analysis of a root cause.',
  10. relevant_code_file: {
  11. file_path: 'src/file.py',
  12. repo_name: 'owner/repo',
  13. },
  14. timeline_item_type: 'internal_code',
  15. title: 'This is the title of a root cause.',
  16. is_most_important_event: true,
  17. },
  18. ],
  19. ...params,
  20. };
  21. }