Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-08-22 00:10:21 +00:00
parent 7f6fde499f
commit 18a3cea2ea
94 changed files with 83 additions and 145 deletions

View File

@ -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:

View File

@ -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 = {

View File

@ -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');

View File

@ -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 = {

View File

@ -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 => {

View File

@ -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);

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const KUBERNETES_VERSIONS = [{ name: '1.14', value: '1.14' }];

View File

@ -1,3 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export const subnetValid = ({ selectedSubnet }) =>
Array.isArray(selectedSubnet) && selectedSubnet.length >= 2;

View File

@ -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 = '',

View File

@ -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 = '',

View File

@ -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),

View File

@ -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';

View File

@ -4,5 +4,4 @@
* @param {Object} environment
* @returns {Object}
*/
// eslint-disable-next-line import/prefer-default-export
export const setDeployBoard = (oldEnvironmentState, environment) => environment;

View File

@ -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,

View File

@ -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()

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const hasSearchQuery = state => state.searchQuery !== '';

View File

@ -33,7 +33,6 @@ const EmptyRouterComponent = {
},
};
// eslint-disable-next-line import/prefer-default-export
export const createRouter = store => {
const router = new IdeRouter({
mode: 'history',

View File

@ -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(

View File

@ -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`),

View File

@ -17,5 +17,4 @@ const getClient = memoize(() =>
),
);
// eslint-disable-next-line import/prefer-default-export
export const query = (...args) => getClient().query(...args);

View File

@ -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);

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const states = {
failed: 'failed',
};

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const normalizeJob = job => ({
id: job.id,
name: job.name,

View File

@ -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);
};

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const PUSH = 'PUSH';

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const allCheck = state => {
const checks = Object.values(state.checks);

View File

@ -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
*

View File

@ -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;
}

View File

@ -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);

View File

@ -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,

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const SET_OVERRIDE = 'SET_OVERRIDE';

View File

@ -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;

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
export function isImageLoaded(element) {
return element.complete && element.naturalHeight !== 0;
}

View File

@ -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));

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const isObject = obj => obj && obj.constructor === Object;

View File

@ -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.

View File

@ -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';

View File

@ -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);

View File

@ -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);

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const ADD_MODULE = 'ADD_MODULE';

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
export const FILTERED_SEARCH = {
MERGE_REQUESTS: 'merge_requests',
ISSUES: 'issues',

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
export const ISSUABLE_INDEX = {
MERGE_REQUEST: 'merge_request_',
ISSUE: 'issue_',

View File

@ -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);
};

View File

@ -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,

View File

@ -1,2 +1 @@
// eslint-disable-next-line import/prefer-default-export
export const decodeAndParse = param => JSON.parse(window.atob(param));

View File

@ -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;

View File

@ -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,

View File

@ -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];

View File

@ -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);

View File

@ -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: {

View File

@ -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();

View File

@ -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');

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const stripQuotes = value => {
return value.includes(' ') ? value.slice(1, -1) : value;
};

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
function trimFirstCharOfLineContent(text) {
if (!text) {
return text;

View File

@ -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 => {

View File

@ -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,

View File

@ -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"

View File

@ -0,0 +1,5 @@
---
title: Adds auto_close_incident column to project_incident_management_settings
merge_request: 39980
author:
type: added

View File

@ -0,0 +1,5 @@
---
title: Improve performance of Gitlab::BacktraceCleaner
merge_request: 40180
author:
type: performance

View File

@ -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

View File

@ -0,0 +1 @@
751a2c8e06b522b1564ea09f961d8883543a631874ae26bb14c98b7b442d59cc

View File

@ -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))
);

View File

@ -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

View File

@ -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": [
],

View File

@ -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 |

View File

@ -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 = "<authentication_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: <your_access_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: <your_access_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=<registration_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

View File

@ -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. |

View File

@ -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

View File

@ -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.

View File

@ -204,8 +204,7 @@ password = <deploy token>
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

View File

@ -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

View File

@ -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

View File

@ -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 ""

View File

@ -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",

View File

@ -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,

View File

@ -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,

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const triggerDOMEvent = type => {
window.document.dispatchEvent(
new Event(type, {

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const useFakeRequestAnimationFrame = () => {
let orig;

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
/*
@module

View File

@ -1,5 +1,3 @@
/* eslint-disable import/prefer-default-export */
export const setLanguage = languageCode => {
const htmlElement = document.querySelector('html');

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const mockIntegrationProps = {
id: 25,
activeToggleProps: {

View File

@ -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');

View File

@ -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());
};

View File

@ -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);

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const resetStore = store => {
store.replaceState({
notes: [],

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const $toast = {
show: jest.fn(),
};

View File

@ -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());
};

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const mockReport = {
status: 'failed',
summary: {

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const adjustMetricQuery = data => {
const updatedMetric = data.metrics;

View File

@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const artifactsList = [
{
text: 'result.txt',

View File

@ -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,

View File

@ -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);

View File

@ -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`);

View File

@ -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"