From 18a3cea2eaaf558de08b715eb9e7b36ee6a1ffab Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 22 Aug 2020 00:10:21 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .eslintrc.yml | 1 + .../admin/statistics_panel/store/getters.js | 1 - app/assets/javascripts/batch_comments/index.js | 1 - .../javascripts/ci_variable_list/constants.js | 1 - .../javascripts/ci_variable_list/store/getters.js | 3 -- .../javascripts/contributors/stores/actions.js | 1 - .../create_cluster/eks_cluster/constants.js | 1 - .../create_cluster/eks_cluster/store/getters.js | 1 - .../design_management/utils/tracking.js | 1 - .../design_management_legacy/utils/tracking.js | 1 - app/assets/javascripts/diffs/diff_file.js | 1 - app/assets/javascripts/diffs/utils/uuids.js | 3 -- .../javascripts/environments/stores/helpers.js | 1 - .../error_tracking/store/details/actions.js | 1 - .../error_tracking/store/details/getters.js | 1 - .../javascripts/frequent_items/store/getters.js | 1 - app/assets/javascripts/ide/ide_router.js | 1 - app/assets/javascripts/ide/lib/diff/diff.js | 2 -- .../javascripts/ide/lib/editorconfig/parser.js | 1 - app/assets/javascripts/ide/services/gql.js | 1 - .../javascripts/ide/stores/modules/pane/getters.js | 1 - .../ide/stores/modules/pipelines/constants.js | 1 - .../ide/stores/modules/pipelines/utils.js | 1 - .../ide/stores/modules/router/actions.js | 1 - .../ide/stores/modules/router/mutation_types.js | 1 - .../ide/stores/modules/terminal/getters.js | 1 - .../javascripts/ide/sync_router_and_store.js | 1 - app/assets/javascripts/import_projects/utils.js | 1 - .../javascripts/integrations/edit/store/actions.js | 1 - .../javascripts/integrations/edit/store/index.js | 1 - .../integrations/edit/store/mutation_types.js | 1 - .../issuables_list/service_desk_helper.js | 1 - app/assets/javascripts/lib/utils/image_utility.js | 2 -- app/assets/javascripts/lib/utils/set.js | 1 - app/assets/javascripts/lib/utils/type_utility.js | 1 - app/assets/javascripts/lib/utils/webpack.js | 1 - app/assets/javascripts/monitoring/csv_export.js | 1 - .../monitoring/stores/embed_group/actions.js | 1 - .../monitoring/stores/embed_group/getters.js | 1 - .../stores/embed_group/mutation_types.js | 1 - app/assets/javascripts/pages/constants.js | 2 -- app/assets/javascripts/pages/projects/constants.js | 2 -- app/assets/javascripts/pipelines/utils.js | 1 - .../javascripts/registry/explorer/stores/index.js | 1 - app/assets/javascripts/registry/explorer/utils.js | 1 - app/assets/javascripts/reports/store/getters.js | 1 - app/assets/javascripts/repository/utils/commit.js | 1 - app/assets/javascripts/repository/utils/icon.js | 1 - app/assets/javascripts/repository/utils/readme.js | 1 - app/assets/javascripts/snippets/mixins/snippets.js | 1 - .../static_site_editor/services/image_service.js | 1 - .../stores/artifacts_list/getters.js | 1 - .../filtered_search_bar/filtered_search_utils.js | 1 - .../vue_shared/components/lib/utils/diff_utils.js | 2 -- app/assets/javascripts/vuex_shared/bindings.js | 1 - app/graphql/types/project_type.rb | 2 +- app/views/layouts/_page.html.haml | 1 - ...dent-column-to-incident_management_settings.yml | 5 +++ .../unreleased/pl-perf-bt-cleaner-regexp-match.yml | 5 +++ ...dent_to_project_incident_management_settings.rb | 13 +++++++ db/schema_migrations/20200820130839 | 1 + db/structure.sql | 1 + doc/api/graphql/reference/gitlab_schema.graphql | 2 +- doc/api/graphql/reference/gitlab_schema.json | 2 +- doc/api/graphql/reference/index.md | 2 +- doc/api/runners.md | 42 +++++++++++----------- doc/api/settings.md | 2 +- doc/development/documentation/styleguide.md | 10 ++++++ doc/development/fe_guide/vuex.md | 4 --- doc/user/packages/pypi_repository/index.md | 3 +- doc/user/profile/personal_access_tokens.md | 28 +++++++-------- lib/gitlab/backtrace_cleaner.rb | 2 +- locale/gitlab.pot | 6 ---- package.json | 2 +- spec/frontend/batch_comments/mock_data.js | 1 - spec/frontend/diffs/mock_data/diff_metadata.js | 3 -- spec/frontend/helpers/dom_events_helper.js | 1 - .../helpers/fake_request_animation_frame.js | 1 - spec/frontend/helpers/jest_helpers.js | 2 -- spec/frontend/helpers/locale_helper.js | 2 -- spec/frontend/integrations/edit/mock_data.js | 1 - spec/frontend/issue_show/helpers.js | 1 - spec/frontend/jobs/store/helpers.js | 1 - spec/frontend/mocks/mocks_helper.js | 1 - spec/frontend/notes/helpers.js | 1 - spec/frontend/registry/shared/mocks.js | 1 - .../releases/stores/modules/list/helpers.js | 1 - .../reports/accessibility_report/mock_data.js | 1 - spec/frontend/serverless/utils.js | 1 - .../frontend/vue_mr_widget/components/mock_data.js | 1 - .../test_helpers/factories/commit.js | 1 - .../test_helpers/mock_server/graphql.js | 1 - .../test_helpers/utils/overclock_timers.js | 1 - yarn.lock | 8 ++--- 94 files changed, 83 insertions(+), 145 deletions(-) create mode 100644 changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml create mode 100644 changelogs/unreleased/pl-perf-bt-cleaner-regexp-match.yml create mode 100644 db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb create mode 100644 db/schema_migrations/20200820130839 diff --git a/.eslintrc.yml b/.eslintrc.yml index 827604ced9a..2b8592fd285 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -17,6 +17,7 @@ settings: config: './config/webpack.config.js' rules: import/no-commonjs: error + import/no-default-export: off no-underscore-dangle: - error - allow: diff --git a/app/assets/javascripts/admin/statistics_panel/store/getters.js b/app/assets/javascripts/admin/statistics_panel/store/getters.js index 2aa34b8f38e..1c1868b5bca 100644 --- a/app/assets/javascripts/admin/statistics_panel/store/getters.js +++ b/app/assets/javascripts/admin/statistics_panel/store/getters.js @@ -3,7 +3,6 @@ * and returns an array of the following form: * [{ key: "forks", label: "Forks", value: 50 }] */ -// eslint-disable-next-line import/prefer-default-export export const getStatistics = state => labels => Object.keys(labels).map(key => { const result = { diff --git a/app/assets/javascripts/batch_comments/index.js b/app/assets/javascripts/batch_comments/index.js index e06285c0b37..9c763e70d63 100644 --- a/app/assets/javascripts/batch_comments/index.js +++ b/app/assets/javascripts/batch_comments/index.js @@ -3,7 +3,6 @@ import { mapActions } from 'vuex'; import store from '~/mr_notes/stores'; import ReviewBar from './components/review_bar.vue'; -// eslint-disable-next-line import/prefer-default-export export const initReviewBar = () => { const el = document.getElementById('js-review-bar'); diff --git a/app/assets/javascripts/ci_variable_list/constants.js b/app/assets/javascripts/ci_variable_list/constants.js index ef304c7ccee..564e1d01242 100644 --- a/app/assets/javascripts/ci_variable_list/constants.js +++ b/app/assets/javascripts/ci_variable_list/constants.js @@ -1,6 +1,5 @@ import { __ } from '~/locale'; -// eslint-disable import/prefer-default-export export const ADD_CI_VARIABLE_MODAL_ID = 'add-ci-variable'; export const displayText = { diff --git a/app/assets/javascripts/ci_variable_list/store/getters.js b/app/assets/javascripts/ci_variable_list/store/getters.js index 14b728302f9..619ad54cad6 100644 --- a/app/assets/javascripts/ci_variable_list/store/getters.js +++ b/app/assets/javascripts/ci_variable_list/store/getters.js @@ -1,6 +1,3 @@ -/* eslint-disable import/prefer-default-export */ -// Disabling import/prefer-default-export can be -// removed once a second getter is added to this file import { uniq } from 'lodash'; export const joinedEnvironments = state => { diff --git a/app/assets/javascripts/contributors/stores/actions.js b/app/assets/javascripts/contributors/stores/actions.js index 393af932fb0..f941c5aa944 100644 --- a/app/assets/javascripts/contributors/stores/actions.js +++ b/app/assets/javascripts/contributors/stores/actions.js @@ -3,7 +3,6 @@ import { __ } from '~/locale'; import service from '../services/contributors_service'; import * as types from './mutation_types'; -// eslint-disable-next-line import/prefer-default-export export const fetchChartData = ({ commit }, endpoint) => { commit(types.SET_LOADING_STATE, true); diff --git a/app/assets/javascripts/create_cluster/eks_cluster/constants.js b/app/assets/javascripts/create_cluster/eks_cluster/constants.js index a850ba89818..27547ed8449 100644 --- a/app/assets/javascripts/create_cluster/eks_cluster/constants.js +++ b/app/assets/javascripts/create_cluster/eks_cluster/constants.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const KUBERNETES_VERSIONS = [{ name: '1.14', value: '1.14' }]; diff --git a/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js b/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js index bbe4930c191..d8489ca31cf 100644 --- a/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js +++ b/app/assets/javascripts/create_cluster/eks_cluster/store/getters.js @@ -1,3 +1,2 @@ -// eslint-disable-next-line import/prefer-default-export export const subnetValid = ({ selectedSubnet }) => Array.isArray(selectedSubnet) && selectedSubnet.length >= 2; diff --git a/app/assets/javascripts/design_management/utils/tracking.js b/app/assets/javascripts/design_management/utils/tracking.js index b3ecc1453a6..49fa306914c 100644 --- a/app/assets/javascripts/design_management/utils/tracking.js +++ b/app/assets/javascripts/design_management/utils/tracking.js @@ -5,7 +5,6 @@ const DESIGN_TRACKING_CONTEXT_SCHEMA = 'iglu:com.gitlab/design_management_contex const DESIGN_TRACKING_PAGE_NAME = 'projects:issues:design'; const DESIGN_TRACKING_EVENT_NAME = 'view_design'; -// eslint-disable-next-line import/prefer-default-export export function trackDesignDetailView( referer = '', owner = '', diff --git a/app/assets/javascripts/design_management_legacy/utils/tracking.js b/app/assets/javascripts/design_management_legacy/utils/tracking.js index b3ecc1453a6..49fa306914c 100644 --- a/app/assets/javascripts/design_management_legacy/utils/tracking.js +++ b/app/assets/javascripts/design_management_legacy/utils/tracking.js @@ -5,7 +5,6 @@ const DESIGN_TRACKING_CONTEXT_SCHEMA = 'iglu:com.gitlab/design_management_contex const DESIGN_TRACKING_PAGE_NAME = 'projects:issues:design'; const DESIGN_TRACKING_EVENT_NAME = 'view_design'; -// eslint-disable-next-line import/prefer-default-export export function trackDesignDetailView( referer = '', owner = '', diff --git a/app/assets/javascripts/diffs/diff_file.js b/app/assets/javascripts/diffs/diff_file.js index 717c4a79ef9..610b71235d9 100644 --- a/app/assets/javascripts/diffs/diff_file.js +++ b/app/assets/javascripts/diffs/diff_file.js @@ -18,7 +18,6 @@ function fileSymlinkInformation(file, fileList) { ); } -/* eslint-disable-next-line import/prefer-default-export */ export function prepareRawDiffFile({ file, allFiles }) { Object.assign(file, { brokenSymlink: fileSymlinkInformation(file, allFiles), diff --git a/app/assets/javascripts/diffs/utils/uuids.js b/app/assets/javascripts/diffs/utils/uuids.js index 1a529c07ccc..12448350e62 100644 --- a/app/assets/javascripts/diffs/utils/uuids.js +++ b/app/assets/javascripts/diffs/utils/uuids.js @@ -11,9 +11,6 @@ * @typedef {String} UUIDv4 */ -// https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20 -/* eslint-disable import/prefer-default-export */ - import MersenneTwister from 'mersenne-twister'; import stringHash from 'string-hash'; import { isString } from 'lodash'; diff --git a/app/assets/javascripts/environments/stores/helpers.js b/app/assets/javascripts/environments/stores/helpers.js index 8eba6c00601..eb47ba29412 100644 --- a/app/assets/javascripts/environments/stores/helpers.js +++ b/app/assets/javascripts/environments/stores/helpers.js @@ -4,5 +4,4 @@ * @param {Object} environment * @returns {Object} */ -// eslint-disable-next-line import/prefer-default-export export const setDeployBoard = (oldEnvironmentState, environment) => environment; diff --git a/app/assets/javascripts/error_tracking/store/details/actions.js b/app/assets/javascripts/error_tracking/store/details/actions.js index 28806b3915c..df5be5224a7 100644 --- a/app/assets/javascripts/error_tracking/store/details/actions.js +++ b/app/assets/javascripts/error_tracking/store/details/actions.js @@ -10,7 +10,6 @@ const stopPolling = poll => { if (poll) poll.stop(); }; -// eslint-disable-next-line import/prefer-default-export export function startPollingStacktrace({ commit }, endpoint) { stackTracePoll = new Poll({ resource: service, diff --git a/app/assets/javascripts/error_tracking/store/details/getters.js b/app/assets/javascripts/error_tracking/store/details/getters.js index f2778fbb2c7..a3b31436c81 100644 --- a/app/assets/javascripts/error_tracking/store/details/getters.js +++ b/app/assets/javascripts/error_tracking/store/details/getters.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const stacktrace = state => state.stacktraceData.stack_trace_entries ? state.stacktraceData.stack_trace_entries.reverse() diff --git a/app/assets/javascripts/frequent_items/store/getters.js b/app/assets/javascripts/frequent_items/store/getters.js index 73e66643f06..36cc9020d8d 100644 --- a/app/assets/javascripts/frequent_items/store/getters.js +++ b/app/assets/javascripts/frequent_items/store/getters.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const hasSearchQuery = state => state.searchQuery !== ''; diff --git a/app/assets/javascripts/ide/ide_router.js b/app/assets/javascripts/ide/ide_router.js index 82cf8d7a10a..396aedbfa10 100644 --- a/app/assets/javascripts/ide/ide_router.js +++ b/app/assets/javascripts/ide/ide_router.js @@ -33,7 +33,6 @@ const EmptyRouterComponent = { }, }; -// eslint-disable-next-line import/prefer-default-export export const createRouter = store => { const router = new IdeRouter({ mode: 'history', diff --git a/app/assets/javascripts/ide/lib/diff/diff.js b/app/assets/javascripts/ide/lib/diff/diff.js index 3a456b7c4d6..62ec798b372 100644 --- a/app/assets/javascripts/ide/lib/diff/diff.js +++ b/app/assets/javascripts/ide/lib/diff/diff.js @@ -1,8 +1,6 @@ import { diffLines } from 'diff'; import { defaultDiffOptions } from '../editor_options'; -// See: https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20 -// eslint-disable-next-line import/prefer-default-export export const computeDiff = (originalContent, newContent) => { // prevent EOL changes from highlighting the entire file const changes = diffLines( diff --git a/app/assets/javascripts/ide/lib/editorconfig/parser.js b/app/assets/javascripts/ide/lib/editorconfig/parser.js index a30a8cb868d..1597e4a8bfa 100644 --- a/app/assets/javascripts/ide/lib/editorconfig/parser.js +++ b/app/assets/javascripts/ide/lib/editorconfig/parser.js @@ -42,7 +42,6 @@ function getRulesWithConfigs(filePath, configFiles = [], rules = {}) { return isRoot ? result : getRulesWithConfigs(filePath, nextConfigs, result); } -// eslint-disable-next-line import/prefer-default-export export function getRulesWithTraversal(filePath, getFileContent) { const editorconfigPaths = [ ...getPathParents(filePath).map(x => `${x}/.editorconfig`), diff --git a/app/assets/javascripts/ide/services/gql.js b/app/assets/javascripts/ide/services/gql.js index 211cc78bd99..89dda187360 100644 --- a/app/assets/javascripts/ide/services/gql.js +++ b/app/assets/javascripts/ide/services/gql.js @@ -17,5 +17,4 @@ const getClient = memoize(() => ), ); -// eslint-disable-next-line import/prefer-default-export export const query = (...args) => getClient().query(...args); diff --git a/app/assets/javascripts/ide/stores/modules/pane/getters.js b/app/assets/javascripts/ide/stores/modules/pane/getters.js index 7816172bb6f..ce597329df1 100644 --- a/app/assets/javascripts/ide/stores/modules/pane/getters.js +++ b/app/assets/javascripts/ide/stores/modules/pane/getters.js @@ -1,3 +1,2 @@ -// eslint-disable-next-line import/prefer-default-export export const isAliveView = state => view => state.keepAliveViews[view] || (state.isOpen && state.currentView === view); diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/constants.js b/app/assets/javascripts/ide/stores/modules/pipelines/constants.js index f5b96327e40..bb4145934ff 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/constants.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/constants.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const states = { failed: 'failed', }; diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/utils.js b/app/assets/javascripts/ide/stores/modules/pipelines/utils.js index a6caca2d2dc..95716e0a0c6 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/utils.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/utils.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const normalizeJob = job => ({ id: job.id, name: job.name, diff --git a/app/assets/javascripts/ide/stores/modules/router/actions.js b/app/assets/javascripts/ide/stores/modules/router/actions.js index 849067599f2..321ac57817f 100644 --- a/app/assets/javascripts/ide/stores/modules/router/actions.js +++ b/app/assets/javascripts/ide/stores/modules/router/actions.js @@ -1,6 +1,5 @@ import * as types from './mutation_types'; -// eslint-disable-next-line import/prefer-default-export export const push = ({ commit }, fullPath) => { commit(types.PUSH, fullPath); }; diff --git a/app/assets/javascripts/ide/stores/modules/router/mutation_types.js b/app/assets/javascripts/ide/stores/modules/router/mutation_types.js index ae99073cc4c..8f5f949bd5f 100644 --- a/app/assets/javascripts/ide/stores/modules/router/mutation_types.js +++ b/app/assets/javascripts/ide/stores/modules/router/mutation_types.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const PUSH = 'PUSH'; diff --git a/app/assets/javascripts/ide/stores/modules/terminal/getters.js b/app/assets/javascripts/ide/stores/modules/terminal/getters.js index ef98547ccc4..b29d391845d 100644 --- a/app/assets/javascripts/ide/stores/modules/terminal/getters.js +++ b/app/assets/javascripts/ide/stores/modules/terminal/getters.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const allCheck = state => { const checks = Object.values(state.checks); diff --git a/app/assets/javascripts/ide/sync_router_and_store.js b/app/assets/javascripts/ide/sync_router_and_store.js index 1782c32b3b2..b33bcbb94ea 100644 --- a/app/assets/javascripts/ide/sync_router_and_store.js +++ b/app/assets/javascripts/ide/sync_router_and_store.js @@ -1,4 +1,3 @@ -/* eslint-disable import/prefer-default-export */ /** * This method adds listeners to the given router and store and syncs their state with eachother * diff --git a/app/assets/javascripts/import_projects/utils.js b/app/assets/javascripts/import_projects/utils.js index c2a2d5a607d..02128c72cb0 100644 --- a/app/assets/javascripts/import_projects/utils.js +++ b/app/assets/javascripts/import_projects/utils.js @@ -1,7 +1,6 @@ import { STATUSES } from './constants'; // Will be expanded in future -// eslint-disable-next-line import/prefer-default-export export function isProjectImportable(project) { return project.importStatus === STATUSES.NONE && !project.importSource.incompatible; } diff --git a/app/assets/javascripts/integrations/edit/store/actions.js b/app/assets/javascripts/integrations/edit/store/actions.js index 3decdaab55d..1a1873979c9 100644 --- a/app/assets/javascripts/integrations/edit/store/actions.js +++ b/app/assets/javascripts/integrations/edit/store/actions.js @@ -1,4 +1,3 @@ import * as types from './mutation_types'; -// eslint-disable-next-line import/prefer-default-export export const setOverride = ({ commit }, override) => commit(types.SET_OVERRIDE, override); diff --git a/app/assets/javascripts/integrations/edit/store/index.js b/app/assets/javascripts/integrations/edit/store/index.js index eea5e48780d..a8375f345c6 100644 --- a/app/assets/javascripts/integrations/edit/store/index.js +++ b/app/assets/javascripts/integrations/edit/store/index.js @@ -7,7 +7,6 @@ import createState from './state'; Vue.use(Vuex); -// eslint-disable-next-line import/prefer-default-export export const createStore = (initialState = {}) => new Vuex.Store({ actions, diff --git a/app/assets/javascripts/integrations/edit/store/mutation_types.js b/app/assets/javascripts/integrations/edit/store/mutation_types.js index 274afe3fb49..dfba3c6d640 100644 --- a/app/assets/javascripts/integrations/edit/store/mutation_types.js +++ b/app/assets/javascripts/integrations/edit/store/mutation_types.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const SET_OVERRIDE = 'SET_OVERRIDE'; diff --git a/app/assets/javascripts/issuables_list/service_desk_helper.js b/app/assets/javascripts/issuables_list/service_desk_helper.js index 4b4a38c2205..71a7dcdd3ba 100644 --- a/app/assets/javascripts/issuables_list/service_desk_helper.js +++ b/app/assets/javascripts/issuables_list/service_desk_helper.js @@ -3,7 +3,6 @@ import { __ } from '~/locale'; /** * Returns the attributes used for gl-empty-state in the Service Desk issues list. */ -// eslint-disable-next-line import/prefer-default-export export function emptyStateHelper(emptyStateMeta) { const { isServiceDeskSupported, svgPath, serviceDeskHelpPage } = emptyStateMeta; diff --git a/app/assets/javascripts/lib/utils/image_utility.js b/app/assets/javascripts/lib/utils/image_utility.js index 2977ec821cb..af531f9f830 100644 --- a/app/assets/javascripts/lib/utils/image_utility.js +++ b/app/assets/javascripts/lib/utils/image_utility.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - export function isImageLoaded(element) { return element.complete && element.naturalHeight !== 0; } diff --git a/app/assets/javascripts/lib/utils/set.js b/app/assets/javascripts/lib/utils/set.js index 3845d648b61..541934c4221 100644 --- a/app/assets/javascripts/lib/utils/set.js +++ b/app/assets/javascripts/lib/utils/set.js @@ -4,6 +4,5 @@ * @param {Set} superset The set to be considered as the superset. * @returns {boolean} */ -// eslint-disable-next-line import/prefer-default-export export const isSubset = (subset, superset) => Array.from(subset).every(value => superset.has(value)); diff --git a/app/assets/javascripts/lib/utils/type_utility.js b/app/assets/javascripts/lib/utils/type_utility.js index be86f336bcd..664c0dbbc84 100644 --- a/app/assets/javascripts/lib/utils/type_utility.js +++ b/app/assets/javascripts/lib/utils/type_utility.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const isObject = obj => obj && obj.constructor === Object; diff --git a/app/assets/javascripts/lib/utils/webpack.js b/app/assets/javascripts/lib/utils/webpack.js index 390294afcb7..622c40e0f35 100644 --- a/app/assets/javascripts/lib/utils/webpack.js +++ b/app/assets/javascripts/lib/utils/webpack.js @@ -1,7 +1,6 @@ import { joinPaths } from '~/lib/utils/url_utility'; // tell webpack to load assets from origin so that web workers don't break -// eslint-disable-next-line import/prefer-default-export export function resetServiceWorkersPublicPath() { // __webpack_public_path__ is a global variable that can be used to adjust // the webpack publicPath setting at runtime. diff --git a/app/assets/javascripts/monitoring/csv_export.js b/app/assets/javascripts/monitoring/csv_export.js index 734e8dc07a7..20cfa23e9b4 100644 --- a/app/assets/javascripts/monitoring/csv_export.js +++ b/app/assets/javascripts/monitoring/csv_export.js @@ -125,7 +125,6 @@ const csvData = (metricHeaders, metricValues) => { * @param {Object} graphData - Panel contents * @returns {String} */ -// eslint-disable-next-line import/prefer-default-export export const graphDataToCsv = graphData => { const delimiter = ','; const br = '\r\n'; diff --git a/app/assets/javascripts/monitoring/stores/embed_group/actions.js b/app/assets/javascripts/monitoring/stores/embed_group/actions.js index 4a7572bdbd9..ca0d2e5ba35 100644 --- a/app/assets/javascripts/monitoring/stores/embed_group/actions.js +++ b/app/assets/javascripts/monitoring/stores/embed_group/actions.js @@ -1,4 +1,3 @@ import * as types from './mutation_types'; -// eslint-disable-next-line import/prefer-default-export export const addModule = ({ commit }, data) => commit(types.ADD_MODULE, data); diff --git a/app/assets/javascripts/monitoring/stores/embed_group/getters.js b/app/assets/javascripts/monitoring/stores/embed_group/getters.js index 096d8d03096..47db787dea5 100644 --- a/app/assets/javascripts/monitoring/stores/embed_group/getters.js +++ b/app/assets/javascripts/monitoring/stores/embed_group/getters.js @@ -1,3 +1,2 @@ -// eslint-disable-next-line import/prefer-default-export export const metricsWithData = (state, getters, rootState, rootGetters) => state.modules.map(module => rootGetters[`${module}/metricsWithData`]().length); diff --git a/app/assets/javascripts/monitoring/stores/embed_group/mutation_types.js b/app/assets/javascripts/monitoring/stores/embed_group/mutation_types.js index 7fd3f0f8647..288e6db4151 100644 --- a/app/assets/javascripts/monitoring/stores/embed_group/mutation_types.js +++ b/app/assets/javascripts/monitoring/stores/embed_group/mutation_types.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const ADD_MODULE = 'ADD_MODULE'; diff --git a/app/assets/javascripts/pages/constants.js b/app/assets/javascripts/pages/constants.js index 35c67190b62..a9773807212 100644 --- a/app/assets/javascripts/pages/constants.js +++ b/app/assets/javascripts/pages/constants.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - export const FILTERED_SEARCH = { MERGE_REQUESTS: 'merge_requests', ISSUES: 'issues', diff --git a/app/assets/javascripts/pages/projects/constants.js b/app/assets/javascripts/pages/projects/constants.js index 9efbf7cd36e..8dc765e5d10 100644 --- a/app/assets/javascripts/pages/projects/constants.js +++ b/app/assets/javascripts/pages/projects/constants.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - export const ISSUABLE_INDEX = { MERGE_REQUEST: 'merge_request_', ISSUE: 'issue_', diff --git a/app/assets/javascripts/pipelines/utils.js b/app/assets/javascripts/pipelines/utils.js index 2e08001f6b3..a7825df6f04 100644 --- a/app/assets/javascripts/pipelines/utils.js +++ b/app/assets/javascripts/pipelines/utils.js @@ -1,7 +1,6 @@ import { pickBy } from 'lodash'; import { SUPPORTED_FILTER_PARAMETERS } from './constants'; -// eslint-disable-next-line import/prefer-default-export export const validateParams = params => { return pickBy(params, (val, key) => SUPPORTED_FILTER_PARAMETERS.includes(key) && val); }; diff --git a/app/assets/javascripts/registry/explorer/stores/index.js b/app/assets/javascripts/registry/explorer/stores/index.js index 54a8e0e1c1c..18e3351ed13 100644 --- a/app/assets/javascripts/registry/explorer/stores/index.js +++ b/app/assets/javascripts/registry/explorer/stores/index.js @@ -7,7 +7,6 @@ import state from './state'; Vue.use(Vuex); -// eslint-disable-next-line import/prefer-default-export export const createStore = () => new Vuex.Store({ state, diff --git a/app/assets/javascripts/registry/explorer/utils.js b/app/assets/javascripts/registry/explorer/utils.js index b1df87c6993..44262a6cbb6 100644 --- a/app/assets/javascripts/registry/explorer/utils.js +++ b/app/assets/javascripts/registry/explorer/utils.js @@ -1,2 +1 @@ -// eslint-disable-next-line import/prefer-default-export export const decodeAndParse = param => JSON.parse(window.atob(param)); diff --git a/app/assets/javascripts/reports/store/getters.js b/app/assets/javascripts/reports/store/getters.js index 6345be69f6f..d49e5760b3f 100644 --- a/app/assets/javascripts/reports/store/getters.js +++ b/app/assets/javascripts/reports/store/getters.js @@ -1,6 +1,5 @@ import { LOADING, ERROR, SUCCESS, STATUS_FAILED } from '../constants'; -// eslint-disable-next-line import/prefer-default-export export const summaryStatus = state => { if (state.isLoading) { return LOADING; diff --git a/app/assets/javascripts/repository/utils/commit.js b/app/assets/javascripts/repository/utils/commit.js index 90ac01c5874..0704ac1627f 100644 --- a/app/assets/javascripts/repository/utils/commit.js +++ b/app/assets/javascripts/repository/utils/commit.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export function normalizeData(data, path, extra = () => {}) { return data.map(d => ({ sha: d.commit.id, diff --git a/app/assets/javascripts/repository/utils/icon.js b/app/assets/javascripts/repository/utils/icon.js index 661ebb6edfc..47b045c7eaf 100644 --- a/app/assets/javascripts/repository/utils/icon.js +++ b/app/assets/javascripts/repository/utils/icon.js @@ -88,7 +88,6 @@ const fileTypeIcons = [ }, ]; -// eslint-disable-next-line import/prefer-default-export export const getIconName = (type, path) => { if (entryTypeIcons[type]) return entryTypeIcons[type]; diff --git a/app/assets/javascripts/repository/utils/readme.js b/app/assets/javascripts/repository/utils/readme.js index 5b62271b02e..50692779b1a 100644 --- a/app/assets/javascripts/repository/utils/readme.js +++ b/app/assets/javascripts/repository/utils/readme.js @@ -28,5 +28,4 @@ const isPlainReadme = file => { return re.test(file.name); }; -// eslint-disable-next-line import/prefer-default-export export const readmeFile = blobs => blobs.find(isRichReadme) || blobs.find(isPlainReadme); diff --git a/app/assets/javascripts/snippets/mixins/snippets.js b/app/assets/javascripts/snippets/mixins/snippets.js index 3f5d64a768f..15daaa8d84a 100644 --- a/app/assets/javascripts/snippets/mixins/snippets.js +++ b/app/assets/javascripts/snippets/mixins/snippets.js @@ -2,7 +2,6 @@ import GetSnippetQuery from '../queries/snippet.query.graphql'; const blobsDefault = []; -// eslint-disable-next-line import/prefer-default-export export const getSnippetMixin = { apollo: { snippet: { diff --git a/app/assets/javascripts/static_site_editor/services/image_service.js b/app/assets/javascripts/static_site_editor/services/image_service.js index edc69d0579a..25ab1084572 100644 --- a/app/assets/javascripts/static_site_editor/services/image_service.js +++ b/app/assets/javascripts/static_site_editor/services/image_service.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const getBinary = file => { return new Promise((resolve, reject) => { const reader = new FileReader(); diff --git a/app/assets/javascripts/vue_merge_request_widget/stores/artifacts_list/getters.js b/app/assets/javascripts/vue_merge_request_widget/stores/artifacts_list/getters.js index 5215d210e1c..15d67ea18ea 100644 --- a/app/assets/javascripts/vue_merge_request_widget/stores/artifacts_list/getters.js +++ b/app/assets/javascripts/vue_merge_request_widget/stores/artifacts_list/getters.js @@ -1,6 +1,5 @@ import { s__, n__ } from '~/locale'; -// eslint-disable-next-line import/prefer-default-export export const title = state => { if (state.isLoading) { return s__('BuildArtifacts|Loading artifacts'); diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js index 85f7f746b49..4a5b8668198 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_utils.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const stripQuotes = value => { return value.includes(' ') ? value.slice(1, -1) : value; }; diff --git a/app/assets/javascripts/vue_shared/components/lib/utils/diff_utils.js b/app/assets/javascripts/vue_shared/components/lib/utils/diff_utils.js index 188ab1769a4..221c4f5b8a8 100644 --- a/app/assets/javascripts/vue_shared/components/lib/utils/diff_utils.js +++ b/app/assets/javascripts/vue_shared/components/lib/utils/diff_utils.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - function trimFirstCharOfLineContent(text) { if (!text) { return text; diff --git a/app/assets/javascripts/vuex_shared/bindings.js b/app/assets/javascripts/vuex_shared/bindings.js index edc31cfa69e..cc18b41e2de 100644 --- a/app/assets/javascripts/vuex_shared/bindings.js +++ b/app/assets/javascripts/vuex_shared/bindings.js @@ -9,7 +9,6 @@ * @param {string} root - the key of the state where to search fo they keys described in list * @returns {Object} a dictionary with all the computed properties generated */ -// eslint-disable-next-line import/prefer-default-export export const mapComputed = (list, defaultUpdateFn, root) => { const result = {}; list.forEach(item => { diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index 36e37654812..69326e3e73b 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -54,7 +54,7 @@ module Types field :container_registry_enabled, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates if the project stores Docker container images in a container registry' field :shared_runners_enabled, GraphQL::BOOLEAN_TYPE, null: true, - description: 'Indicates if Shared Runners are enabled for the project' + description: 'Indicates if shared runners are enabled for the project' field :lfs_enabled, GraphQL::BOOLEAN_TYPE, null: true, description: 'Indicates if the project has Large File Storage (LFS) enabled' field :merge_requests_ff_only_enabled, GraphQL::BOOLEAN_TYPE, null: true, diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 3a543fef292..1ef368160a8 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -5,7 +5,6 @@ .mobile-overlay .alert-wrapper = render 'shared/outdated_browser' - = render_if_exists 'layouts/header/users_over_license_banner' = render_if_exists "layouts/header/licensed_user_count_threshold" = render_if_exists "layouts/header/token_expiry_notification" = render "layouts/broadcast" diff --git a/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml b/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml new file mode 100644 index 00000000000..63a049cd8f5 --- /dev/null +++ b/changelogs/unreleased/add-auto_close_incident-column-to-incident_management_settings.yml @@ -0,0 +1,5 @@ +--- +title: Adds auto_close_incident column to project_incident_management_settings +merge_request: 39980 +author: +type: added diff --git a/changelogs/unreleased/pl-perf-bt-cleaner-regexp-match.yml b/changelogs/unreleased/pl-perf-bt-cleaner-regexp-match.yml new file mode 100644 index 00000000000..f4bb781a9d9 --- /dev/null +++ b/changelogs/unreleased/pl-perf-bt-cleaner-regexp-match.yml @@ -0,0 +1,5 @@ +--- +title: Improve performance of Gitlab::BacktraceCleaner +merge_request: 40180 +author: +type: performance diff --git a/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb b/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb new file mode 100644 index 00000000000..01aafa6d988 --- /dev/null +++ b/db/migrate/20200820130839_add_auto_close_incident_to_project_incident_management_settings.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddAutoCloseIncidentToProjectIncidentManagementSettings < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def up + add_column :project_incident_management_settings, :auto_close_incident, :boolean, default: true, null: false + end + + def down + remove_column :project_incident_management_settings, :auto_close_incident + end +end diff --git a/db/schema_migrations/20200820130839 b/db/schema_migrations/20200820130839 new file mode 100644 index 00000000000..e372e4df2be --- /dev/null +++ b/db/schema_migrations/20200820130839 @@ -0,0 +1 @@ +751a2c8e06b522b1564ea09f961d8883543a631874ae26bb14c98b7b442d59cc \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index eb5cc6c7433..ba020532953 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14408,6 +14408,7 @@ CREATE TABLE public.project_incident_management_settings ( pagerduty_active boolean DEFAULT false NOT NULL, encrypted_pagerduty_token bytea, encrypted_pagerduty_token_iv bytea, + auto_close_incident boolean DEFAULT true NOT NULL, CONSTRAINT pagerduty_token_iv_length_constraint CHECK ((octet_length(encrypted_pagerduty_token_iv) <= 12)), CONSTRAINT pagerduty_token_length_constraint CHECK ((octet_length(encrypted_pagerduty_token) <= 255)) ); diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index c6c5bd15b5c..afc7e813699 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -11886,7 +11886,7 @@ type Project { ): ServiceConnection """ - Indicates if Shared Runners are enabled for the project + Indicates if shared runners are enabled for the project """ sharedRunnersEnabled: Boolean diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index 53adde5bdc3..3365e7eb49c 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -34868,7 +34868,7 @@ }, { "name": "sharedRunnersEnabled", - "description": "Indicates if Shared Runners are enabled for the project", + "description": "Indicates if shared runners are enabled for the project", "args": [ ], diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index f36156411b7..635d1a6fe1e 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -1686,7 +1686,7 @@ Information about pagination in a connection. | `sentryErrors` | SentryErrorCollection | Paginated collection of Sentry errors on the project | | `serviceDeskAddress` | String | E-mail address of the service desk. | | `serviceDeskEnabled` | Boolean | Indicates if the project has service desk enabled. | -| `sharedRunnersEnabled` | Boolean | Indicates if Shared Runners are enabled for the project | +| `sharedRunnersEnabled` | Boolean | Indicates if shared runners are enabled for the project | | `snippetsEnabled` | Boolean | Indicates if Snippets are enabled for the current user | | `sshUrlToRepo` | String | URL to connect to the project via SSH | | `starCount` | Int! | Number of times the project has been starred | diff --git a/doc/api/runners.md b/doc/api/runners.md index 4cda4b723f5..436abe0a706 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -6,30 +6,30 @@ info: To determine the technical writer assigned to the Stage/Group associated w # Runners API -> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2640) in GitLab 8.5 +> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/2640) in GitLab 8.5. ## Registration and authentication tokens -There are two tokens to take into account when connecting a Runner with GitLab. +There are two tokens to take into account when connecting a runner with GitLab. | Token | Description | | ----- | ----------- | -| Registration token | Token used to [register the Runner](https://docs.gitlab.com/runner/register/). It can be [obtained through GitLab](../ci/runners/README.md). | -| Authentication token | Token used to authenticate the Runner with the GitLab instance. It is obtained either automatically when [registering a Runner](https://docs.gitlab.com/runner/register/), or manually when [registering the Runner via the Runners API](#register-a-new-runner). | +| Registration token | Token used to [register the runner](https://docs.gitlab.com/runner/register/). It can be [obtained through GitLab](../ci/runners/README.md). | +| Authentication token | Token used to authenticate the runner with the GitLab instance. It is obtained either automatically when [registering a runner](https://docs.gitlab.com/runner/register/), or manually when [registering the runner via the Runner API](#register-a-new-runner). | -Here's an example of how the two tokens are used in Runner registration: +Here's an example of how the two tokens are used in runner registration: -1. You register the Runner via the GitLab API using a registration token, and an +1. You register the runner via the GitLab API using a registration token, and an authentication token is returned. 1. You use that authentication token and add it to the - [Runner's configuration file](https://docs.gitlab.com/runner/commands/#configuration-file): + [runner's configuration file](https://docs.gitlab.com/runner/commands/#configuration-file): ```toml [[runners]] token = "" ``` -GitLab and Runner are then connected. +GitLab and the runner are then connected. ## List owned runners @@ -224,7 +224,7 @@ PUT /runners/:id | `run_untagged`| boolean | no | Flag indicating the runner can execute untagged jobs | | `locked` | boolean | no | Flag indicating the runner is locked | | `access_level` | string | no | The access_level of the runner; `not_protected` or `ref_protected` | -| `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job | +| `maximum_timeout` | integer | no | Maximum timeout set when this runner will handle the job | ```shell curl --request PUT --header "PRIVATE-TOKEN: " "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2" @@ -291,7 +291,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: " "https://git > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/15432) in GitLab 10.3. -List jobs that are being processed or were processed by specified Runner. +List jobs that are being processed or were processed by specified runner. ```plaintext GET /runners/:id/jobs @@ -541,9 +541,9 @@ Example response: ] ``` -## Register a new Runner +## Register a new runner -Register a new Runner for the instance. +Register a new runner for the instance. ```plaintext POST /runners @@ -554,12 +554,12 @@ POST /runners | `token` | string | yes | [Registration token](#registration-and-authentication-tokens). | | `description`| string | no | Runner's description| | `info` | hash | no | Runner's metadata | -| `active` | boolean | no | Whether the Runner is active | -| `locked` | boolean | no | Whether the Runner should be locked for current project | -| `run_untagged` | boolean | no | Whether the Runner should handle untagged jobs | -| `tag_list` | string array | no | List of Runner's tags | +| `active` | boolean | no | Whether the runner is active | +| `locked` | boolean | no | Whether the runner should be locked for current project | +| `run_untagged` | boolean | no | Whether the runner should handle untagged jobs | +| `tag_list` | string array | no | List of runner's tags | | `access_level` | string | no | The access_level of the runner; `not_protected` or `ref_protected` | -| `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job | +| `maximum_timeout` | integer | no | Maximum timeout set when this runner will handle the job | ```shell curl --request POST "https://gitlab.example.com/api/v4/runners" --form "token=" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2" @@ -580,9 +580,9 @@ Example response: } ``` -## Delete a registered Runner +## Delete a registered runner -Deletes a registered Runner. +Deletes a registered runner. ```plaintext DELETE /runners @@ -602,9 +602,9 @@ Response: |-----------|---------------------------------| | 204 | Runner was deleted | -## Verify authentication for a registered Runner +## Verify authentication for a registered runner -Validates authentication credentials for a registered Runner. +Validates authentication credentials for a registered runner. ```plaintext POST /runners/verify diff --git a/doc/api/settings.md b/doc/api/settings.md index 9c4ebf084ad..c06f00ded85 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -329,7 +329,7 @@ are listed in the descriptions of the relevant settings. | `send_user_confirmation_email` | boolean | no | Send confirmation email on sign-up. | | `session_expire_delay` | integer | no | Session duration in minutes. GitLab restart is required to apply changes | | `shared_runners_enabled` | boolean | no | (**If enabled, requires:** `shared_runners_text` and `shared_runners_minutes`) Enable shared runners for new projects. | -| `shared_runners_minutes` | integer | required by: `shared_runners_enabled` | **(PREMIUM)** Set the maximum number of pipeline minutes that a group can use on shared Runners per month. | +| `shared_runners_minutes` | integer | required by: `shared_runners_enabled` | **(PREMIUM)** Set the maximum number of pipeline minutes that a group can use on shared runners per month. | | `shared_runners_text` | string | required by: `shared_runners_enabled` | Shared runners text. | | `sign_in_text` | string | no | Text on the login page. | | `signin_enabled` | string | no | (Deprecated: Use `password_authentication_enabled_for_web` instead) Flag indicating if password authentication is enabled for the web interface. | diff --git a/doc/development/documentation/styleguide.md b/doc/development/documentation/styleguide.md index c252f6425d0..02caefd67b6 100644 --- a/doc/development/documentation/styleguide.md +++ b/doc/development/documentation/styleguide.md @@ -313,6 +313,16 @@ Capitalize names of: Follow the capitalization style listed at the [authoritative source](#links-to-external-documentation) for the entity, which may use non-standard case styles. For example: GitLab and npm. +Use forms of *sign in*, instead of *log in* or *login*. For example: + +- Sign in to GitLab. +- Open the sign-in page. + +Exceptions to this rule include the concept of *single sign-on* and +references to user interface elements. For example: + +- To sign in to product X, enter your credentials, and then click **Log in**. + ### Inclusive language We strive to create documentation that is inclusive. This section includes guidance and examples in the diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index 9573dd36e63..d71a200ebfb 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -55,10 +55,6 @@ export const createStore = () => }); ``` -_Note:_ Until this -[RFC](https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20) is implemented, -the above will need to disable the `import/prefer-default-export` ESLint rule. - ### `state.js` The first thing you should do before writing any code is to design the state. diff --git a/doc/user/packages/pypi_repository/index.md b/doc/user/packages/pypi_repository/index.md index 63e6cd7b5b4..c723b0b9b03 100644 --- a/doc/user/packages/pypi_repository/index.md +++ b/doc/user/packages/pypi_repository/index.md @@ -204,8 +204,7 @@ password = When uploading packages, note that: - The maximum allowed size is 50 Megabytes. -- If you upload the same package with the same version multiple times, each consecutive upload - is saved as a separate file. When installing a package, GitLab serves the most recent file. +- You cannot upload the same version of a package multiple times. If you try, you receive the error `Validation failed: File name has already been taken`. ### Upload packages with Twine diff --git a/doc/user/profile/personal_access_tokens.md b/doc/user/profile/personal_access_tokens.md index ae73842dd98..776dc4542ee 100644 --- a/doc/user/profile/personal_access_tokens.md +++ b/doc/user/profile/personal_access_tokens.md @@ -28,6 +28,20 @@ For examples of how you can use a personal access token to authenticate with the GitLab also offers [impersonation tokens](../../api/README.md#impersonation-tokens) which are created by administrators via the API. They're a great fit for automated authentication as a specific user. +## Creating a personal access token + +You can create as many personal access tokens as you like from your GitLab +profile. + +1. Sign in to GitLab. +1. In the upper-right corner, click your avatar and select **Settings**. +1. On the **User Settings** menu, select **Access Tokens**. +1. Choose a name and optional expiry date for the token. +1. Choose the [desired scopes](#limiting-scopes-of-a-personal-access-token). +1. Click the **Create personal access token** button. +1. Save the personal access token somewhere safe. If you navigate away or refresh +your page, and you did not save the token, you must create a new one. + ## Enable or disable notification for Expired personal access token **(CORE ONLY)** [GitLab administrators with access to the GitLab Rails console](../../administration/feature_flags.md) @@ -45,20 +59,6 @@ To disable it: Feature.disable(:expired_pat_email_notification) ``` -## Creating a personal access token - -You can create as many personal access tokens as you like from your GitLab -profile. - -1. Log in to GitLab. -1. In the upper-right corner, click your avatar and select **Settings**. -1. On the **User Settings** menu, select **Access Tokens**. -1. Choose a name and optional expiry date for the token. -1. Choose the [desired scopes](#limiting-scopes-of-a-personal-access-token). -1. Click the **Create personal access token** button. -1. Save the personal access token somewhere safe. If you navigate away or refresh -your page, and you did not save the token, you must create a new one. - ### Revoking a personal access token At any time, you can revoke any personal access token by clicking the diff --git a/lib/gitlab/backtrace_cleaner.rb b/lib/gitlab/backtrace_cleaner.rb index d04f0983d12..caea05c720d 100644 --- a/lib/gitlab/backtrace_cleaner.rb +++ b/lib/gitlab/backtrace_cleaner.rb @@ -31,7 +31,7 @@ module Gitlab return unless backtrace Array(Rails.backtrace_cleaner.clean(backtrace)).reject do |line| - line.match(IGNORED_BACKTRACES_REGEXP) + IGNORED_BACKTRACES_REGEXP.match?(line) end end end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 58cda95e69a..055a3e7511d 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -14433,9 +14433,6 @@ msgstr "" msgid "License|License" msgstr "" -msgid "License|Licensed user count exceeded" -msgstr "" - msgid "License|You can restore access to the Gold features at any time by upgrading." msgstr "" @@ -14451,9 +14448,6 @@ msgstr "" msgid "License|Your free trial of GitLab Ultimate expired on %{trial_ends_on}." msgstr "" -msgid "License|Your instance has exceeded your subscription's number of licensed users by %{extra_users_count}. You can continue to add more users and we'll include the overage in your next bill." -msgstr "" - msgid "Limit display of time tracking units to hours." msgstr "" diff --git a/package.json b/package.json index 0aa69e4f790..8c3f27849e5 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.10.1", - "@gitlab/eslint-plugin": "3.2.0", + "@gitlab/eslint-plugin": "4.0.0", "@testing-library/dom": "^7.16.2", "@vue/test-utils": "1.0.0-beta.30", "acorn": "^6.3.0", diff --git a/spec/frontend/batch_comments/mock_data.js b/spec/frontend/batch_comments/mock_data.js index 5601e489066..973f0d469d4 100644 --- a/spec/frontend/batch_comments/mock_data.js +++ b/spec/frontend/batch_comments/mock_data.js @@ -1,6 +1,5 @@ import { TEST_HOST } from 'spec/test_constants'; -// eslint-disable-next-line import/prefer-default-export export const createDraft = () => ({ author: { id: 1, diff --git a/spec/frontend/diffs/mock_data/diff_metadata.js b/spec/frontend/diffs/mock_data/diff_metadata.js index b73b29e4bc8..cfa0038c06f 100644 --- a/spec/frontend/diffs/mock_data/diff_metadata.js +++ b/spec/frontend/diffs/mock_data/diff_metadata.js @@ -1,6 +1,3 @@ -/* eslint-disable import/prefer-default-export */ -/* https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/20 */ - export const diffMetadata = { real_size: '1', size: 1, diff --git a/spec/frontend/helpers/dom_events_helper.js b/spec/frontend/helpers/dom_events_helper.js index 139e0813397..423e5c58bb4 100644 --- a/spec/frontend/helpers/dom_events_helper.js +++ b/spec/frontend/helpers/dom_events_helper.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const triggerDOMEvent = type => { window.document.dispatchEvent( new Event(type, { diff --git a/spec/frontend/helpers/fake_request_animation_frame.js b/spec/frontend/helpers/fake_request_animation_frame.js index b01ae5b7c5f..f6fc29df4dc 100644 --- a/spec/frontend/helpers/fake_request_animation_frame.js +++ b/spec/frontend/helpers/fake_request_animation_frame.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const useFakeRequestAnimationFrame = () => { let orig; diff --git a/spec/frontend/helpers/jest_helpers.js b/spec/frontend/helpers/jest_helpers.js index 4a150be9935..0b623e0a59b 100644 --- a/spec/frontend/helpers/jest_helpers.js +++ b/spec/frontend/helpers/jest_helpers.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - /* @module diff --git a/spec/frontend/helpers/locale_helper.js b/spec/frontend/helpers/locale_helper.js index 80047b06003..283d9bc14c9 100644 --- a/spec/frontend/helpers/locale_helper.js +++ b/spec/frontend/helpers/locale_helper.js @@ -1,5 +1,3 @@ -/* eslint-disable import/prefer-default-export */ - export const setLanguage = languageCode => { const htmlElement = document.querySelector('html'); diff --git a/spec/frontend/integrations/edit/mock_data.js b/spec/frontend/integrations/edit/mock_data.js index da2758ec15c..0886290c908 100644 --- a/spec/frontend/integrations/edit/mock_data.js +++ b/spec/frontend/integrations/edit/mock_data.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const mockIntegrationProps = { id: 25, activeToggleProps: { diff --git a/spec/frontend/issue_show/helpers.js b/spec/frontend/issue_show/helpers.js index 5d2ced98ae4..7ca6a22929d 100644 --- a/spec/frontend/issue_show/helpers.js +++ b/spec/frontend/issue_show/helpers.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const keyboardDownEvent = (code, metaKey = false, ctrlKey = false) => { const e = new CustomEvent('keydown'); diff --git a/spec/frontend/jobs/store/helpers.js b/spec/frontend/jobs/store/helpers.js index 81a769b4a6e..78e33394b63 100644 --- a/spec/frontend/jobs/store/helpers.js +++ b/spec/frontend/jobs/store/helpers.js @@ -1,6 +1,5 @@ import state from '~/jobs/store/state'; -// eslint-disable-next-line import/prefer-default-export export const resetStore = store => { store.replaceState(state()); }; diff --git a/spec/frontend/mocks/mocks_helper.js b/spec/frontend/mocks/mocks_helper.js index 823ab41a5ba..0aa80331434 100644 --- a/spec/frontend/mocks/mocks_helper.js +++ b/spec/frontend/mocks/mocks_helper.js @@ -29,7 +29,6 @@ const getMockFiles = root => readdir.sync(root, { deep: MAX_DEPTH, filter: mockF const defaultSetMock = (srcPath, mockPath) => jest.mock(srcPath, () => jest.requireActual(mockPath)); -// eslint-disable-next-line import/prefer-default-export export const setupManualMocks = function setupManualMocks(setMock = defaultSetMock) { prefixMap.forEach(({ mocksRoot, requirePrefix }) => { const mocksRootAbsolute = path.join(__dirname, mocksRoot); diff --git a/spec/frontend/notes/helpers.js b/spec/frontend/notes/helpers.js index 3f349b40ba5..c8168a49a5b 100644 --- a/spec/frontend/notes/helpers.js +++ b/spec/frontend/notes/helpers.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const resetStore = store => { store.replaceState({ notes: [], diff --git a/spec/frontend/registry/shared/mocks.js b/spec/frontend/registry/shared/mocks.js index e33d06e7499..fdef38b6f10 100644 --- a/spec/frontend/registry/shared/mocks.js +++ b/spec/frontend/registry/shared/mocks.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const $toast = { show: jest.fn(), }; diff --git a/spec/frontend/releases/stores/modules/list/helpers.js b/spec/frontend/releases/stores/modules/list/helpers.js index 435ca36047e..3ca255eaf8c 100644 --- a/spec/frontend/releases/stores/modules/list/helpers.js +++ b/spec/frontend/releases/stores/modules/list/helpers.js @@ -1,6 +1,5 @@ import state from '~/releases/stores/modules/list/state'; -// eslint-disable-next-line import/prefer-default-export export const resetStore = store => { store.replaceState(state()); }; diff --git a/spec/frontend/reports/accessibility_report/mock_data.js b/spec/frontend/reports/accessibility_report/mock_data.js index 20ad01bd802..9dace1e7c54 100644 --- a/spec/frontend/reports/accessibility_report/mock_data.js +++ b/spec/frontend/reports/accessibility_report/mock_data.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const mockReport = { status: 'failed', summary: { diff --git a/spec/frontend/serverless/utils.js b/spec/frontend/serverless/utils.js index ba451b7d573..4af3eda1ffb 100644 --- a/spec/frontend/serverless/utils.js +++ b/spec/frontend/serverless/utils.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const adjustMetricQuery = data => { const updatedMetric = data.metrics; diff --git a/spec/frontend/vue_mr_widget/components/mock_data.js b/spec/frontend/vue_mr_widget/components/mock_data.js index 39c7d75cda5..73e254f2b1a 100644 --- a/spec/frontend/vue_mr_widget/components/mock_data.js +++ b/spec/frontend/vue_mr_widget/components/mock_data.js @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/prefer-default-export export const artifactsList = [ { text: 'result.txt', diff --git a/spec/frontend_integration/test_helpers/factories/commit.js b/spec/frontend_integration/test_helpers/factories/commit.js index 1ee82e74ffe..09bb5fd589b 100644 --- a/spec/frontend_integration/test_helpers/factories/commit.js +++ b/spec/frontend_integration/test_helpers/factories/commit.js @@ -2,7 +2,6 @@ import { withValues } from '../utils/obj'; import { getCommit } from '../fixtures'; import { createCommitId } from './commit_id'; -// eslint-disable-next-line import/prefer-default-export export const createNewCommit = ({ id = createCommitId(), message }, orig = getCommit()) => { return withValues(orig, { id, diff --git a/spec/frontend_integration/test_helpers/mock_server/graphql.js b/spec/frontend_integration/test_helpers/mock_server/graphql.js index 6dcc4798378..654c373e5a6 100644 --- a/spec/frontend_integration/test_helpers/mock_server/graphql.js +++ b/spec/frontend_integration/test_helpers/mock_server/graphql.js @@ -16,6 +16,5 @@ const graphqlResolvers = { }, }; -// eslint-disable-next-line import/prefer-default-export export const graphqlQuery = (query, variables, schema) => graphql(graphqlSchema, query, graphqlResolvers, schema, variables); diff --git a/spec/frontend_integration/test_helpers/utils/overclock_timers.js b/spec/frontend_integration/test_helpers/utils/overclock_timers.js index 046c7f8e527..7df8af30a61 100644 --- a/spec/frontend_integration/test_helpers/utils/overclock_timers.js +++ b/spec/frontend_integration/test_helpers/utils/overclock_timers.js @@ -31,7 +31,6 @@ * * @param {Number} boost */ -// eslint-disable-next-line import/prefer-default-export export const useOverclockTimers = (boost = 50) => { if (boost <= 0) { throw new Error(`[overclock_timers] boost (${boost}) cannot be <= 0`); diff --git a/yarn.lock b/yarn.lock index 7a4fc6c234e..fd2ecde5850 100644 --- a/yarn.lock +++ b/yarn.lock @@ -827,10 +827,10 @@ resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.5.tgz#5f6bfe6baaef360daa9b038fa78798d7a6a916b4" integrity sha512-282Dn3SPVsUHVDhMsXgfnv+Rzog0uxecjttxGRQvxh25es1+xvkGQFsvJfkSKJ3X1kHVkSjKf+Tt5Rra+Jhp9g== -"@gitlab/eslint-plugin@3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-3.2.0.tgz#e1780c2cab4c206e4900f2a1a4cf636f788182ea" - integrity sha512-3s28sQoGMgmwKtmVij7TjBDdW6fHiP4k6k6FWZdU6XZBJFwwA0JlU8PzYZRRTyY+pYed2u1jF06LHzv5YWNS2g== +"@gitlab/eslint-plugin@4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-4.0.0.tgz#7beba53dea74f458d92040a8b2652e4fd60a6cc7" + integrity sha512-Gba9HXwWOLAN+O2H8WmGNPZFQ410wiGFmhgDQ5Sx4ic/N1ymtwNen2pnsaWcw8KK/1vAB/rHNUhH4Xu/l/mfMg== dependencies: babel-eslint "^10.0.3" eslint-config-airbnb-base "^14.0.0" -- cgit v1.2.1