-
Notifications
You must be signed in to change notification settings - Fork 730
Expand file tree
/
Copy pathindex.ts
More file actions
72 lines (67 loc) · 2.46 KB
/
Copy pathindex.ts
File metadata and controls
72 lines (67 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import config from '@/config';
import github from './github/config';
import githubNango from './github-nango/config';
import git from './git/config';
import groupsio from './groupsio/config';
import confluence from './confluence/config';
import jira from './jira/config';
import slack from './slack/config';
import discord from './discord/config';
import linkedin from './linkedin/config';
import twitter from './twitter/config';
import reddit from './reddit/config';
import hackernews from './hackernews/config';
import stackoverflow from './stackoverflow/config';
import gitlab from './gitlab/config';
import gerrit from './gerrit/config';
import discourse from './discourse/config';
import devto from './devto/config';
import sched from './sched/config';
export interface ActionRequiredMessage {
key: string
text: string
}
export interface IntegrationConfig {
key: string // Unique key for the integration
name: string // Display name of the integration
image: string // Image URL for the integration
description: string // Description of the integration
link?: string // Documentation link for the integration
connectComponent?: Vue.Component // Component rendered for user to connect integration
actionComponent?: Vue.Component // Component rendered when integration needs user action
statusComponent?: Vue.Component // Component rendered to show integration status
connectedParamsComponent?: Vue.Component // Component rendered to show connected integration params (repositories, channels)
dropdownComponent?: Vue.Component // Component rendered inside dropdown for extra options
settingComponent?: Vue.Component // Component rendered next to dropdown for extra options
mappedReposComponent?: Vue.Component // Component rendered to show mapped repositories
showProgress: boolean // Show progress bar when connecting
actionRequiredMessage?: ActionRequiredMessage[]
}
export const getGithubIntegration = () => {
if (config.env === 'staging') {
const useGitHubNango = localStorage.getItem('useGitHubNango') === 'true';
return useGitHubNango ? githubNango : github;
}
return github;
};
export const lfIntegrations: (useGitHubNango?: boolean) => Record<string, IntegrationConfig> = (
useGitHubNango?: boolean,
) => ({
github: useGitHubNango ? githubNango : getGithubIntegration(),
git,
gitlab,
gerrit,
groupsio,
confluence,
jira,
slack,
discord,
linkedin,
twitter,
reddit,
hackernews,
stackoverflow,
discourse,
devto,
sched,
});