Skip to content
Snippets Groups Projects
Commit 76623c12 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent b042382b
No related branches found
No related tags found
No related merge requests found
Showing
with 181 additions and 62 deletions
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-tag: &if-canonical-gitlab-tag
.if-canonical-dot-com-gitlab-org-groups-tag: &if-canonical-dot-com-gitlab-org-groups-tag
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_COMMIT_TAG'
 
cloud-native-image:
Loading
Loading
@@ -13,5 +13,5 @@ cloud-native-image:
- install_gitlab_gem
- CNG_PROJECT_PATH="gitlab-org/build/CNG" BUILD_TRIGGER_TOKEN=$CI_JOB_TOKEN ./scripts/trigger-build cng
rules:
- <<: *if-canonical-gitlab-tag
- <<: *if-canonical-dot-com-gitlab-org-groups-tag
when: manual
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-dot-com-gitlab-org-groups-merge-request: &if-canonical-dot-com-gitlab-org-groups-merge-request
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ && $CI_MERGE_REQUEST_IID'
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-not-ee: &if-not-ee
if: '$CI_PROJECT_NAME !~ /^gitlab(-ee)?$/'
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-default-refs: &if-default-refs
if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG'
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.code-docs-patterns: &code-docs-patterns
- ".gitlab/route-map.yml"
- "doc/**/*"
- ".markdownlint.json"
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.code-backstage-qa-patterns: &code-backstage-qa-patterns
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- ".csscomb.json"
- "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- "{babel.config,jest.config}.js"
- "config.ru"
- "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
# Backstage changes
- "Dangerfile"
- "danger/**/*"
- "{,ee/}fixtures/**/*"
- "{,ee/}rubocop/**/*"
- "{,ee/}spec/**/*"
- "doc/README.md" # Some RSpec test rely on this file
# QA changes
- ".dockerignore"
- "qa/**/*"
.review-docs:
extends:
- .default-tags
- .default-retry
- .only:variables-canonical-dot-com
- .only:changes-docs
only:
refs:
- merge_requests
rules:
- <<: *if-canonical-dot-com-gitlab-org-groups-merge-request
changes: *code-docs-patterns
when: manual
image: ruby:2.6-alpine
stage: review
dependencies: []
Loading
Loading
@@ -32,7 +75,6 @@ review-docs-deploy:
extends: .review-docs
script:
- ./scripts/trigger-build-docs deploy
when: manual
 
# Cleanup remote environment of gitlab-docs
review-docs-cleanup:
Loading
Loading
@@ -42,14 +84,15 @@ review-docs-cleanup:
action: stop
script:
- ./scripts/trigger-build-docs cleanup
when: manual
 
docs lint:
extends:
- .default-tags
- .default-retry
- .default-only
- .only:changes-docs
rules:
- <<: *if-default-refs
changes: *code-docs-patterns
when: on_success
image: "registry.gitlab.com/gitlab-org/gitlab-docs:docs-lint"
stage: test
dependencies: []
Loading
Loading
@@ -69,14 +112,17 @@ docs lint:
 
graphql-reference-verify:
extends:
- .only-ee
- .default-tags
- .default-retry
- .default-cache
- .default-only
- .default-before_script
- .only:changes-code-backstage-qa
- .use-pg9
rules:
- <<: *if-not-ee
when: never
- <<: *if-default-refs
changes: *code-backstage-qa-patterns
when: on_success
stage: test
needs: ["setup-test-env"]
script:
Loading
Loading
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-default-refs: &if-default-refs
if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG'
# Make sure to update all the similar patterns in other CI config files if you modify these patterns
.code-patterns: &code-patterns
- ".gitlab/ci/**/*"
- ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}"
- ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml"
- ".csscomb.json"
- "Dockerfile.assets"
- "*_VERSION"
- "Gemfile{,.lock}"
- "Rakefile"
- "{babel.config,jest.config}.js"
- "config.ru"
- "{package.json,yarn.lock}"
- "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
.only-code-memory-job-base:
extends:
- .default-tags
- .default-retry
- .default-cache
- .default-only
- .default-before_script
- .only:changes-code
rules:
- <<: *if-default-refs
changes: *code-patterns
when: on_success
 
memory-static:
extends: .only-code-memory-job-base
Loading
Loading
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-dot-com-gitlab-org-group-master-refs: &if-canonical-dot-com-gitlab-org-group-master-refs
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_COMMIT_REF_NAME == "master"'
pages:
extends:
- .default-tags
- .default-retry
- .default-cache
- .default-only
- .only:variables-canonical-dot-com
- .only:changes-code-backstage-qa
only:
refs:
- master
rules:
- <<: *if-canonical-dot-com-gitlab-org-group-master-refs
when: on_success
stage: pages
dependencies: ["coverage", "karma", "gitlab:assets:compile pull-cache"]
script:
Loading
Loading
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
.if-canonical-dot-com-gitlab-org-group-schedule: &if-canonical-dot-com-gitlab-org-group-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"'
 
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
Loading
Loading
@@ -86,7 +86,7 @@ package-and-qa:
- <<: *if-canonical-gitlab-merge-request
changes: *code-patterns
when: manual
- <<: *if-canonical-gitlab-schedule
- <<: *if-canonical-dot-com-gitlab-org-group-schedule
when: on_success
needs: ["build-qa-image", "gitlab:assets:compile pull-cache"]
allow_failure: true
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
.if-canonical-gitlab-schedule: &if-canonical-gitlab-schedule
.if-canonical-dot-com-gitlab-org-group-schedule: &if-canonical-dot-com-gitlab-org-group-schedule
if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"'
 
# Make sure to update all the similar conditions in other CI config files if you modify these conditions
Loading
Loading
@@ -47,7 +47,7 @@ build-qa-image:
- <<: *if-canonical-gitlab-merge-request
changes: *code-qa-patterns
when: on_success
- <<: *if-canonical-gitlab-schedule
- <<: *if-canonical-dot-com-gitlab-org-group-schedule
when: on_success
script:
- '[[ ! -d "ee/" ]] || export GITLAB_EDITION="ee"'
Loading
Loading
// ECMAScript polyfills
import 'core-js/es/array/fill';
import 'core-js/es/array/find';
import 'core-js/es/array/find-index';
import 'core-js/es/array/from';
import 'core-js/es/array/includes';
import 'core-js/es/number/is-integer';
import 'core-js/es/object/assign';
import 'core-js/es/object/values';
import 'core-js/es/object/entries';
import 'core-js/es/promise';
import 'core-js/es/promise/finally';
import 'core-js/es/string/code-point-at';
import 'core-js/es/string/from-code-point';
import 'core-js/es/string/includes';
import 'core-js/es/string/starts-with';
import 'core-js/es/string/ends-with';
import 'core-js/es/symbol';
import 'core-js/es/map';
import 'core-js/es/weak-map';
import 'core-js/modules/web.url';
import 'core-js/stable';
 
// Browser polyfills
import 'formdata-polyfill';
Loading
Loading
import $ from 'jquery';
import 'at.js';
import _ from 'underscore';
import SidebarMediator from '~/sidebar/sidebar_mediator';
import glRegexp from './lib/utils/regexp';
import AjaxCache from './lib/utils/ajax_cache';
import { spriteIcon } from './lib/utils/common_utils';
Loading
Loading
@@ -53,8 +54,8 @@ export const defaultAutocompleteConfig = {
};
 
class GfmAutoComplete {
constructor(dataSources) {
this.dataSources = dataSources || {};
constructor(dataSources = {}) {
this.dataSources = dataSources;
this.cachedData = {};
this.isLoadingData = {};
}
Loading
Loading
@@ -199,6 +200,16 @@ class GfmAutoComplete {
}
 
setupMembers($input) {
const fetchData = this.fetchData.bind(this);
const MEMBER_COMMAND = {
ASSIGN: '/assign',
UNASSIGN: '/unassign',
REASSIGN: '/reassign',
CC: '/cc',
};
let assignees = [];
let command = '';
// Team Members
$input.atwho({
at: '@',
Loading
Loading
@@ -225,6 +236,48 @@ class GfmAutoComplete {
callbacks: {
...this.getDefaultCallbacks(),
beforeSave: membersBeforeSave,
matcher(flag, subtext) {
const subtextNodes = subtext
.split(/\n+/g)
.pop()
.split(GfmAutoComplete.regexSubtext);
// Check if @ is followed by '/assign', '/reassign', '/unassign' or '/cc' commands.
command = subtextNodes.find(node => {
if (Object.values(MEMBER_COMMAND).includes(node)) {
return node;
}
return null;
});
// Cache assignees list for easier filtering later
assignees = SidebarMediator.singleton?.store?.assignees?.map(
assignee => `${assignee.username} ${assignee.name}`,
);
const match = GfmAutoComplete.defaultMatcher(flag, subtext, this.app.controllers);
return match && match.length ? match[1] : null;
},
filter(query, data, searchKey) {
if (GfmAutoComplete.isLoading(data)) {
fetchData(this.$inputor, this.at);
return data;
}
if (data === GfmAutoComplete.defaultLoadingData) {
return $.fn.atwho.default.callbacks.filter(query, data, searchKey);
}
if (command === MEMBER_COMMAND.ASSIGN) {
// Only include members which are not assigned to Issuable currently
return data.filter(member => !assignees.includes(member.search));
} else if (command === MEMBER_COMMAND.UNASSIGN) {
// Only include members which are assigned to Issuable currently
return data.filter(member => assignees.includes(member.search));
}
return data;
},
},
});
}
Loading
Loading
Loading
Loading
@@ -44,7 +44,7 @@ export const setLastCommitMessage = ({ commit, rootGetters }, data) => {
const commitMsg = sprintf(
__('Your changes have been committed. Commit %{commitId} %{commitStats}'),
{
commitId: `<a href="${currentProject.web_url}/commit/${data.short_id}" class="commit-sha">${data.short_id}</a>`,
commitId: `<a href="${currentProject.web_url}/-/commit/${data.short_id}" class="commit-sha">${data.short_id}</a>`,
commitStats,
},
false,
Loading
Loading
@@ -56,7 +56,7 @@ export const setLastCommitMessage = ({ commit, rootGetters }, data) => {
export const updateFilesAfterCommit = ({ commit, dispatch, rootState, rootGetters }, { data }) => {
const selectedProject = rootGetters.currentProject;
const lastCommit = {
commit_path: `${selectedProject.web_url}/commit/${data.id}`,
commit_path: `${selectedProject.web_url}/-/commit/${data.id}`,
commit: {
id: data.id,
message: data.message,
Loading
Loading
Loading
Loading
@@ -209,7 +209,7 @@ export default {
id,
createdAt: created_at,
sha,
commitUrl: `${this.projectPath}/commit/${sha}`,
commitUrl: `${this.projectPath}/-/commit/${sha}`,
tag,
tagUrl: tag ? `${this.tagsPath}/${ref.name}` : null,
ref: ref.name,
Loading
Loading
import 'core-js/es/map';
import 'core-js/es/set';
import { Sortable } from 'sortablejs';
import simulateDrag from './simulate_drag';
import simulateInput from './simulate_input';
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@ class FlowdockService < Service
token: token,
repo: project.repository,
repo_url: "#{Gitlab.config.gitlab.url}/#{project.full_path}",
commit_url: "#{Gitlab.config.gitlab.url}/#{project.full_path}/commit/%s",
commit_url: "#{Gitlab.config.gitlab.url}/#{project.full_path}/-/commit/%s",
diff_url: "#{Gitlab.config.gitlab.url}/#{project.full_path}/compare/%s...%s"
)
end
Loading
Loading
Loading
Loading
@@ -451,10 +451,6 @@ class Repository
 
return unless repo_type.project?
 
# This call is stubbed in tests due to being an expensive operation
# It can be reenabled for specific tests via:
#
# allow(DetectRepositoryLanguagesWorker).to receive(:perform_async).and_call_original
DetectRepositoryLanguagesWorker.perform_async(project.id)
end
 
Loading
Loading
Loading
Loading
@@ -66,7 +66,7 @@
 
- if Feature.enabled?(:create_cloud_run_clusters, clusterable, default_enabled: true)
.form-group
= provider_gcp_field.check_box :cloud_run, { label: s_('ClusterIntegration|Enable Cloud Run on GKE (beta)'),
= provider_gcp_field.check_box :cloud_run, { label: s_('ClusterIntegration|Enable Cloud Run for Anthos'),
label_class: 'label-bold' }
.form-text.text-muted
= s_('ClusterIntegration|Uses the Cloud Run, Istio, and HTTP Load Balancing addons for this cluster.')
Loading
Loading
Loading
Loading
@@ -22,7 +22,8 @@ module WorkerAttributes
 
# EE-specific
epics: 2,
incident_management: 2
incident_management: 2,
security_scans: 2
}.stringify_keys.freeze
 
class_methods do
Loading
Loading
Loading
Loading
@@ -6,6 +6,8 @@ const presets = [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: 3, proposals: true },
modules: false,
targets: {
ie: '11',
Loading
Loading
@@ -51,4 +53,4 @@ if (isJest) {
plugins.push('babel-plugin-dynamic-import-node');
}
 
module.exports = { presets, plugins };
module.exports = { presets, plugins, sourceType: 'unambiguous' };
---
title: Make smarter user suggestions for assign slash commands
merge_request: 24294
author:
type: added
---
title: Rename Cloud Run on GKE to Cloud Run for Anthos
merge_request: 23694
author:
type: other
---
title: Move commit routes under - scope
merge_request: 24279
author:
type: changed
---
title: Store security scans run in CI jobs
merge_request: 23669
author:
type: other
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment