Welcome to mirror list, hosted at ThFree Co, Russian Federation.

constants.js « integrations « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e803e11bf6d7051e792bd1351973e80e9369afa4 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import { s__, __ } from '~/locale';

export const integrationLevels = {
  PROJECT: 'project',
  GROUP: 'group',
  INSTANCE: 'instance',
};

export const defaultIntegrationLevel = integrationLevels.INSTANCE;

export const overrideDropdownDescriptions = {
  [integrationLevels.GROUP]: s__(
    'Integrations|Default settings are inherited from the group level.',
  ),
  [integrationLevels.INSTANCE]: s__(
    'Integrations|Default settings are inherited from the instance level.',
  ),
};

export const I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE = s__(
  'Integrations|Connection failed. Check your integration settings.',
);
export const I18N_DEFAULT_ERROR_MESSAGE = __('Something went wrong on our end.');
export const I18N_SUCCESSFUL_CONNECTION_MESSAGE = s__('Integrations|Connection successful.');

export const settingsTabTitle = __('Settings');
export const overridesTabTitle = s__('Integrations|Projects using custom settings');

export const integrationFormSections = {
  CONFIGURATION: 'configuration',
  CONNECTION: 'connection',
  JIRA_TRIGGER: 'jira_trigger',
  JIRA_ISSUES: 'jira_issues',
  TRIGGER: 'trigger',
  APPLE_APP_STORE: 'apple_app_store',
  GOOGLE_PLAY: 'google_play',
};

export const integrationFormSectionComponents = {
  [integrationFormSections.CONFIGURATION]: 'IntegrationSectionConfiguration',
  [integrationFormSections.CONNECTION]: 'IntegrationSectionConnection',
  [integrationFormSections.JIRA_TRIGGER]: 'IntegrationSectionJiraTrigger',
  [integrationFormSections.JIRA_ISSUES]: 'IntegrationSectionJiraIssues',
  [integrationFormSections.TRIGGER]: 'IntegrationSectionTrigger',
  [integrationFormSections.APPLE_APP_STORE]: 'IntegrationSectionAppleAppStore',
  [integrationFormSections.GOOGLE_PLAY]: 'IntegrationSectionGooglePlay',
};

export const integrationTriggerEvents = {
  PUSH: 'push_events',
  ISSUE: 'issues_events',
  CONFIDENTIAL_ISSUE: 'confidential_issues_events',
  MERGE_REQUEST: 'merge_requests_events',
  NOTE: 'note_events',
  CONFIDENTIAL_NOTE: 'confidential_note_events',
  TAG_PUSH: 'tag_push_events',
  PIPELINE: 'pipeline_events',
  WIKI_PAGE: 'wiki_page_events',
  DEPLOYMENT: 'deployment_events',
  ALERT: 'alert_events',
  INCIDENT: 'incident_events',
};

export const integrationTriggerEventTitles = {
  [integrationTriggerEvents.PUSH]: s__('IntegrationEvents|A push is made to the repository'),
  [integrationTriggerEvents.ISSUE]: s__(
    'IntegrationEvents|An issue is created, closed, or reopened',
  ),
  [integrationTriggerEvents.CONFIDENTIAL_ISSUE]: s__(
    'IntegrationEvents|A confidential issue is created, closed, or reopened',
  ),
  [integrationTriggerEvents.MERGE_REQUEST]: s__(
    'IntegrationEvents|A merge request is created, merged, closed, or reopened',
  ),
  [integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added'),
  [integrationTriggerEvents.CONFIDENTIAL_NOTE]: s__(
    'IntegrationEvents|An internal note or comment on a confidential issue is added',
  ),
  [integrationTriggerEvents.TAG_PUSH]: s__(
    'IntegrationEvents|A tag is pushed to the repository or removed',
  ),
  [integrationTriggerEvents.PIPELINE]: s__('IntegrationEvents|A pipeline status changes'),
  [integrationTriggerEvents.WIKI_PAGE]: s__('IntegrationEvents|A wiki page is created or updated'),
  [integrationTriggerEvents.DEPLOYMENT]: s__(
    'IntegrationEvents|A deployment is started or finished',
  ),
  [integrationTriggerEvents.ALERT]: s__('IntegrationEvents|A new, unique alert is recorded'),
  [integrationTriggerEvents.INCIDENT]: s__(
    'IntegrationEvents|An incident is created, closed, or reopened',
  ),
};

export const billingPlans = {
  PREMIUM: 'premium',
  ULTIMATE: 'ultimate',
};

export const billingPlanNames = {
  [billingPlans.PREMIUM]: s__('BillingPlans|Premium'),
  [billingPlans.ULTIMATE]: s__('BillingPlans|Ultimate'),
};

const INTEGRATION_TYPE_SLACK = 'slack';
const INTEGRATION_TYPE_SLACK_APPLICATION = 'gitlab_slack_application';
const INTEGRATION_TYPE_MATTERMOST = 'mattermost';

export const placeholderForType = {
  [INTEGRATION_TYPE_SLACK]: __('#general, #development'),
  [INTEGRATION_TYPE_SLACK_APPLICATION]: __('#general, #development'),
  [INTEGRATION_TYPE_MATTERMOST]: __('my-channel'),
};

export const INTEGRATION_FORM_TYPE_JIRA = 'jira';
export const INTEGRATION_FORM_TYPE_SLACK = 'gitlab_slack_application';

export const jiraIntegrationAuthFields = {
  AUTH_TYPE: 'jira_auth_type',
  USERNAME: 'username',
  PASSWORD: 'password',
};
export const jiraAuthTypeFieldProps = [
  {
    username: s__('JiraService|Email or username'),
    password: s__('JiraService|API token or password'),
    passwordHelp: s__(
      'JiraService|API token for Jira Cloud or password for Jira Data Center and Jira Server',
    ),
    nonEmptyPassword: s__('JiraService|New API token or password'),
  },
  {
    password: s__('JiraService|Jira personal access token'),
    nonEmptyPassword: s__('JiraService|New Jira personal access token'),
  },
];