2021-12-11 22:18:48 +05:30
|
|
|
import { s__, __ } from '~/locale';
|
2020-11-24 15:15:51 +05:30
|
|
|
|
|
|
|
export const integrationLevels = {
|
2022-05-07 20:08:51 +05:30
|
|
|
PROJECT: 'project',
|
2020-11-24 15:15:51 +05:30
|
|
|
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.',
|
|
|
|
),
|
|
|
|
};
|
2021-12-11 22:18:48 +05:30
|
|
|
|
|
|
|
export const I18N_FETCH_TEST_SETTINGS_DEFAULT_ERROR_MESSAGE = s__(
|
2022-08-13 15:12:31 +05:30
|
|
|
'Integrations|Connection failed. Check your integration settings.',
|
2021-12-11 22:18:48 +05:30
|
|
|
);
|
|
|
|
export const I18N_DEFAULT_ERROR_MESSAGE = __('Something went wrong on our end.');
|
|
|
|
export const I18N_SUCCESSFUL_CONNECTION_MESSAGE = s__('Integrations|Connection successful.');
|
2022-03-02 08:16:31 +05:30
|
|
|
|
|
|
|
export const settingsTabTitle = __('Settings');
|
|
|
|
export const overridesTabTitle = s__('Integrations|Projects using custom settings');
|
2022-05-07 20:08:51 +05:30
|
|
|
|
|
|
|
export const integrationFormSections = {
|
2022-07-23 23:45:48 +05:30
|
|
|
CONFIGURATION: 'configuration',
|
2022-05-07 20:08:51 +05:30
|
|
|
CONNECTION: 'connection',
|
|
|
|
JIRA_TRIGGER: 'jira_trigger',
|
|
|
|
JIRA_ISSUES: 'jira_issues',
|
2022-07-23 23:45:48 +05:30
|
|
|
TRIGGER: 'trigger',
|
2023-05-27 22:25:52 +05:30
|
|
|
APPLE_APP_STORE: 'apple_app_store',
|
|
|
|
GOOGLE_PLAY: 'google_play',
|
2022-05-07 20:08:51 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
export const integrationFormSectionComponents = {
|
2022-07-23 23:45:48 +05:30
|
|
|
[integrationFormSections.CONFIGURATION]: 'IntegrationSectionConfiguration',
|
2022-05-07 20:08:51 +05:30
|
|
|
[integrationFormSections.CONNECTION]: 'IntegrationSectionConnection',
|
|
|
|
[integrationFormSections.JIRA_TRIGGER]: 'IntegrationSectionJiraTrigger',
|
|
|
|
[integrationFormSections.JIRA_ISSUES]: 'IntegrationSectionJiraIssues',
|
2022-07-23 23:45:48 +05:30
|
|
|
[integrationFormSections.TRIGGER]: 'IntegrationSectionTrigger',
|
2023-05-27 22:25:52 +05:30
|
|
|
[integrationFormSections.APPLE_APP_STORE]: 'IntegrationSectionAppleAppStore',
|
|
|
|
[integrationFormSections.GOOGLE_PLAY]: 'IntegrationSectionGooglePlay',
|
2022-07-23 23:45:48 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
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',
|
2023-03-17 16:20:25 +05:30
|
|
|
DEPLOYMENT: 'deployment_events',
|
2022-07-23 23:45:48 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
export const integrationTriggerEventTitles = {
|
|
|
|
[integrationTriggerEvents.PUSH]: s__('IntegrationEvents|A push is made to the repository'),
|
|
|
|
[integrationTriggerEvents.ISSUE]: s__(
|
2023-04-23 21:23:45 +05:30
|
|
|
'IntegrationEvents|An issue is created, closed, or reopened',
|
2022-07-23 23:45:48 +05:30
|
|
|
),
|
|
|
|
[integrationTriggerEvents.CONFIDENTIAL_ISSUE]: s__(
|
2023-04-23 21:23:45 +05:30
|
|
|
'IntegrationEvents|A confidential issue is created, closed, or reopened',
|
2022-07-23 23:45:48 +05:30
|
|
|
),
|
|
|
|
[integrationTriggerEvents.MERGE_REQUEST]: s__(
|
2023-04-23 21:23:45 +05:30
|
|
|
'IntegrationEvents|A merge request is created, merged, closed, or reopened',
|
2022-07-23 23:45:48 +05:30
|
|
|
),
|
2023-04-23 21:23:45 +05:30
|
|
|
[integrationTriggerEvents.NOTE]: s__('IntegrationEvents|A comment is added'),
|
2022-07-23 23:45:48 +05:30
|
|
|
[integrationTriggerEvents.CONFIDENTIAL_NOTE]: s__(
|
2023-04-23 21:23:45 +05:30
|
|
|
'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',
|
2022-07-23 23:45:48 +05:30
|
|
|
),
|
|
|
|
[integrationTriggerEvents.PIPELINE]: s__('IntegrationEvents|A pipeline status changes'),
|
|
|
|
[integrationTriggerEvents.WIKI_PAGE]: s__('IntegrationEvents|A wiki page is created or updated'),
|
2023-03-17 16:20:25 +05:30
|
|
|
[integrationTriggerEvents.DEPLOYMENT]: s__(
|
|
|
|
'IntegrationEvents|A deployment is started or finished',
|
|
|
|
),
|
2022-05-07 20:08:51 +05:30
|
|
|
};
|
2022-07-16 23:28:13 +05:30
|
|
|
|
|
|
|
export const billingPlans = {
|
|
|
|
PREMIUM: 'premium',
|
|
|
|
ULTIMATE: 'ultimate',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const billingPlanNames = {
|
|
|
|
[billingPlans.PREMIUM]: s__('BillingPlans|Premium'),
|
|
|
|
[billingPlans.ULTIMATE]: s__('BillingPlans|Ultimate'),
|
|
|
|
};
|
2022-08-13 15:12:31 +05:30
|
|
|
|
2023-05-27 22:25:52 +05:30
|
|
|
const INTEGRATION_TYPE_SLACK = 'slack';
|
2023-01-13 00:05:48 +05:30
|
|
|
const INTEGRATION_TYPE_SLACK_APPLICATION = 'gitlab_slack_application';
|
2022-08-13 15:12:31 +05:30
|
|
|
const INTEGRATION_TYPE_MATTERMOST = 'mattermost';
|
|
|
|
|
|
|
|
export const placeholderForType = {
|
|
|
|
[INTEGRATION_TYPE_SLACK]: __('#general, #development'),
|
2023-01-13 00:05:48 +05:30
|
|
|
[INTEGRATION_TYPE_SLACK_APPLICATION]: __('#general, #development'),
|
2022-08-13 15:12:31 +05:30
|
|
|
[INTEGRATION_TYPE_MATTERMOST]: __('my-channel'),
|
|
|
|
};
|
2022-11-25 23:54:43 +05:30
|
|
|
|
|
|
|
export const INTEGRATION_FORM_TYPE_SLACK = 'gitlab_slack_application';
|