asana.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. export function AsanaPlugin() {
  2. return {
  3. status: 'unknown',
  4. description: 'Integrate Asana issues by linking a repository to a project.',
  5. isTestable: false,
  6. hasConfiguration: true,
  7. shortName: 'Asana',
  8. slug: 'asana',
  9. name: 'Asana',
  10. assets: [],
  11. title: 'Asana',
  12. contexts: [],
  13. doc: '',
  14. resourceLinks: [
  15. {url: 'https://github.com/getsentry/sentry/issues', title: 'Bug Tracker'},
  16. {url: 'https://github.com/getsentry/sentry', title: 'Source'},
  17. ],
  18. allowed_actions: ['create', 'link', 'unlink'],
  19. enabled: true,
  20. id: 'asana',
  21. version: '9.1.0.dev0',
  22. canDisable: true,
  23. author: {url: 'https://github.com/getsentry/sentry', name: 'Sentry Team'},
  24. type: 'issue-tracking',
  25. metadata: {},
  26. };
  27. }
  28. export function AsanaCreate() {
  29. return [
  30. {
  31. name: 'workspace',
  32. default: 608780875677549,
  33. choices: [[608780875677549, 'sentry.io']],
  34. readonly: true,
  35. label: 'Asana Workspace',
  36. type: 'select',
  37. },
  38. {
  39. default: 'Error: Loading chunk 3 failed.',
  40. type: 'text',
  41. name: 'title',
  42. label: 'Name',
  43. },
  44. {
  45. default:
  46. 'http://localhost:8000/default/internal/issues/3750/\n\n```\nError: Loading chunk 3 failed.\n at HTMLScriptElement.onScriptComplete (/_static/1529684704/sentry/dist/vendor.js:762:24)\n```',
  47. required: false,
  48. type: 'textarea',
  49. name: 'description',
  50. label: 'Notes',
  51. },
  52. {
  53. name: 'project',
  54. placeholder: 'Start typing to search for a project',
  55. required: false,
  56. has_autocomplete: true,
  57. label: 'Project',
  58. type: 'select',
  59. },
  60. {
  61. name: 'assignee',
  62. placeholder: 'Start typing to search for a user',
  63. required: false,
  64. has_autocomplete: true,
  65. label: 'Assignee',
  66. type: 'select',
  67. },
  68. ];
  69. }
  70. const DEFAULT_AUTOCOMPLETE = {text: '(#724210387969378) billy', id: 724210387969378};
  71. export function AsanaAutocomplete(type = 'project', values = [DEFAULT_AUTOCOMPLETE]) {
  72. return {[type]: values};
  73. }