Skip to content

Commit 672f729

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent f9a4c3a commit 672f729

File tree

45 files changed

+358
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+358
-86
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ workflow:
122122

123123
variables:
124124
PG_VERSION: "13"
125-
DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-rust-${RUST_VERSION}-node-16.14-postgresql-${PG_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36"
125+
DEFAULT_CI_IMAGE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}.patched-golang-${GO_VERSION}-rust-${RUST_VERSION}-node-18.16-postgresql-${PG_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-yarn-1.22-graphicsmagick-1.3.36"
126126
# We set $GITLAB_DEPENDENCY_PROXY to another variable (since it's set at the group level and has higher precedence than .gitlab-ci.yml)
127127
# so that we can override $GITLAB_DEPENDENCY_PROXY_ADDRESS in workflow rules.
128128
GITLAB_DEPENDENCY_PROXY_ADDRESS: "${GITLAB_DEPENDENCY_PROXY}"

.gitlab/ci/frontend.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
- .default-retry
44
- .default-before_script
55
- .assets-compile-cache
6-
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-16.14:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36
6+
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-18.16:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36
77
variables:
88
SETUP_DB: "false"
99
WEBPACK_VENDOR_DLL: "true"

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.15.0
1+
18.16.0

app/assets/javascripts/analytics/cycle_analytics/components/filter_bar.vue

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import UserToken from '~/vue_shared/components/filtered_search_bar/tokens/user_t
2222
import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label_token.vue';
2323
import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue';
2424
import UrlSync from '~/vue_shared/components/url_sync.vue';
25+
import { MAX_LABELS } from '../constants';
2526
2627
export default {
2728
name: 'FilterBar',
@@ -70,6 +71,7 @@ export default {
7071
symbol: '~',
7172
operators: OPERATORS_IS,
7273
fetchLabels: this.fetchLabels,
74+
maxSuggestions: MAX_LABELS,
7375
},
7476
{
7577
icon: 'pencil',

app/assets/javascripts/analytics/cycle_analytics/constants.js

+1
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ export const METRICS_REQUESTS = [
4343

4444
export const MILESTONES_ENDPOINT = '/-/milestones.json';
4545
export const LABELS_ENDPOINT = '/-/labels.json';
46+
export const MAX_LABELS = 100;

app/assets/javascripts/ci/runner/components/registration/registration_feedback_banner.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import ILLUSTRATION_URL from '@gitlab/svgs/dist/illustrations/multi-editor_all_changes_committed_empty.svg?url';
2+
import ILLUSTRATION_URL from '@gitlab/svgs/dist/illustrations/rocket-launch-md.svg?url';
33
import { GlBanner } from '@gitlab/ui';
44
import { s__ } from '~/locale';
55
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';

app/assets/javascripts/ci/runner/components/runner_jobs_empty_state.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script>
2-
import EMPTY_STATE_SVG_URL from '@gitlab/svgs/dist/illustrations/pipelines_empty.svg?url';
2+
import EMPTY_STATE_SVG_URL from '@gitlab/svgs/dist/illustrations/empty-state/empty-pipeline-md.svg?url';
33
44
import { GlEmptyState } from '@gitlab/ui';
55
import { s__ } from '~/locale';
@@ -19,7 +19,11 @@ export default {
1919
</script>
2020

2121
<template>
22-
<gl-empty-state :svg-path="$options.EMPTY_STATE_SVG_URL" :title="$options.i18n.title">
22+
<gl-empty-state
23+
:svg-path="$options.EMPTY_STATE_SVG_URL"
24+
:svg-height="150"
25+
:title="$options.i18n.title"
26+
>
2327
<template #description>
2428
<p>{{ $options.i18n.description }}</p>
2529
</template>

app/assets/javascripts/ci/runner/components/runner_list_empty_state.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
2-
import EMPTY_STATE_SVG_URL from '@gitlab/svgs/dist/illustrations/pipelines_empty.svg?url';
3-
import FILTERED_SVG_URL from '@gitlab/svgs/dist/illustrations/magnifying-glass.svg?url';
2+
import EMPTY_STATE_SVG_URL from '@gitlab/svgs/dist/illustrations/empty-state/empty-pipeline-md.svg?url';
3+
import FILTERED_SVG_URL from '@gitlab/svgs/dist/illustrations/empty-state/empty-search-md.svg?url';
44
55
import { GlEmptyState, GlLink, GlSprintf, GlModalDirective } from '@gitlab/ui';
66
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';

app/assets/javascripts/graphql_shared/issuable_client.js

-8
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ export const config = {
9292
});
9393
},
9494
},
95-
userPermissions: {
96-
read(permission = {}) {
97-
return {
98-
...permission,
99-
setWorkItemMetadata: false,
100-
};
101-
},
102-
},
10395
},
10496
},
10597
MemberInterfaceConnection: {

app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/base_token.vue

+9-1
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ export default {
113113
* present in "Recently used"
114114
*/
115115
availableSuggestions() {
116-
return this.searchKey
116+
const suggestions = this.searchKey
117117
? this.suggestions
118118
: this.suggestions.filter(
119119
(tokenValue) =>
120120
!this.recentTokenIds.includes(tokenValue[this.valueIdentifier]) &&
121121
!this.preloadedTokenIds.includes(tokenValue[this.valueIdentifier]),
122122
);
123+
124+
return this.applyMaxSuggestions(suggestions);
123125
},
124126
showDefaultSuggestions() {
125127
return this.availableDefaultSuggestions.length > 0;
@@ -196,6 +198,12 @@ export default {
196198
setTokenValueToRecentlyUsed(this.config.recentSuggestionsStorageKey, activeTokenValue);
197199
}
198200
},
201+
applyMaxSuggestions(suggestions) {
202+
const { maxSuggestions } = this.config;
203+
if (!maxSuggestions || maxSuggestions <= 0) return suggestions;
204+
205+
return suggestions.slice(0, maxSuggestions);
206+
},
199207
},
200208
};
201209
</script>

app/assets/javascripts/work_items/graphql/work_item.fragment.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ fragment WorkItem on WorkItem {
2727
userPermissions {
2828
deleteWorkItem
2929
updateWorkItem
30-
setWorkItemMetadata @client
3130
adminParentLink
31+
setWorkItemMetadata
3232
}
3333
widgets {
3434
...WorkItemWidgets
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# frozen_string_literal: true
2+
3+
# This concern can be included in devise controllers to skip showing an "already signed in"
4+
# warning on registrations and logins
5+
module SkipsAlreadySignedInMessage
6+
extend ActiveSupport::Concern
7+
8+
included do
9+
# replaced with :require_no_authentication_without_flash
10+
# rubocop: disable Rails/LexicallyScopedActionFilter
11+
# The actions are defined in Devise
12+
skip_before_action :require_no_authentication, only: [:new, :create]
13+
before_action :require_no_authentication_without_flash, only: [:new, :create]
14+
# rubocop: enable Rails/LexicallyScopedActionFilter
15+
end
16+
17+
def require_no_authentication_without_flash
18+
require_no_authentication
19+
20+
return unless flash[:alert] == I18n.t('devise.failure.already_authenticated')
21+
22+
flash[:alert] = nil
23+
end
24+
end

app/controllers/registrations_controller.rb

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class RegistrationsController < Devise::RegistrationsController
1010
include GoogleAnalyticsCSP
1111
include PreferredLanguageSwitcher
1212
include Gitlab::Tracking::Helpers::WeakPasswordErrorEvent
13+
include SkipsAlreadySignedInMessage
1314

1415
layout 'devise'
1516

app/controllers/sessions_controller.rb

+1-12
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ class SessionsController < Devise::SessionsController
1414
include VerifiesWithEmail
1515
include GoogleAnalyticsCSP
1616
include PreferredLanguageSwitcher
17+
include SkipsAlreadySignedInMessage
1718

1819
skip_before_action :check_two_factor_requirement, only: [:destroy]
1920
skip_before_action :check_password_expiration, only: [:destroy]
2021

21-
# replaced with :require_no_authentication_without_flash
22-
skip_before_action :require_no_authentication, only: [:new, :create]
23-
2422
prepend_before_action :check_initial_setup, only: [:new]
2523
prepend_before_action :authenticate_with_two_factor,
2624
if: -> { action_name == 'create' && two_factor_enabled? }
@@ -29,7 +27,6 @@ class SessionsController < Devise::SessionsController
2927
prepend_before_action :require_no_authentication_without_flash, only: [:new, :create]
3028
prepend_before_action :check_forbidden_password_based_login, if: -> { action_name == 'create' && password_based_login? }
3129
prepend_before_action :ensure_password_authentication_enabled!, if: -> { action_name == 'create' && password_based_login? }
32-
3330
before_action :auto_sign_in_with_provider, only: [:new]
3431
before_action :init_preferred_language, only: :new
3532
before_action :store_unauthenticated_sessions, only: [:new]
@@ -96,14 +93,6 @@ def destroy
9693

9794
private
9895

99-
def require_no_authentication_without_flash
100-
require_no_authentication
101-
102-
if flash[:alert] == I18n.t('devise.failure.already_authenticated')
103-
flash[:alert] = nil
104-
end
105-
end
106-
10796
def captcha_enabled?
10897
request.headers[CAPTCHA_HEADER] && helpers.recaptcha_enabled?
10998
end

app/helpers/ci/pipelines_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def pipelines_list_data(project, list_url)
9393
pipeline_schedule_url: pipeline_schedules_path(project),
9494
empty_state_svg_path: image_path('illustrations/empty-state/empty-pipeline-md.svg'),
9595
error_state_svg_path: image_path('illustrations/pipelines_failed.svg'),
96-
no_pipelines_svg_path: image_path('illustrations/pipelines_pending.svg'),
96+
no_pipelines_svg_path: image_path('illustrations/empty-state/empty-pipeline-md.svg'),
9797
can_create_pipeline: can?(current_user, :create_pipeline, project).to_s,
9898
new_pipeline_path: can?(current_user, :create_pipeline, project) && new_project_pipeline_path(project),
9999
ci_lint_path: can?(current_user, :create_pipeline, project) && project_ci_lint_path(project),

app/helpers/ide_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def legacy_ide_data(project:)
4242
{
4343
'empty-state-svg-path' => image_path('illustrations/multi_file_editor_empty.svg'),
4444
'no-changes-state-svg-path' => image_path('illustrations/multi-editor_no_changes_empty.svg'),
45-
'committed-state-svg-path' => image_path('illustrations/multi-editor_all_changes_committed_empty.svg'),
45+
'committed-state-svg-path' => image_path('illustrations/rocket-launch-md.svg'),
4646
'pipelines-empty-state-svg-path': image_path('illustrations/empty-state/empty-pipeline-md.svg'),
4747
'switch-editor-svg-path': image_path('illustrations/rocket-launch-md.svg'),
4848
'promotion-svg-path': image_path('illustrations/web-ide_promotion.svg'),

app/models/group.rb

+2
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ def of_ancestors_and_self
187187
Group.from_union([by_id(ids), by_id(ids_by_full_path), where('LOWER(path) IN (?)', paths.map(&:downcase))])
188188
end
189189

190+
scope :excluding_groups, ->(groups) { where.not(id: groups) }
191+
190192
scope :for_authorized_group_members, -> (user_ids) do
191193
joins(:group_members)
192194
.where(members: { user_id: user_ids })

app/views/projects/_new_project_fields.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
variant: :success) do |c|
4949
- c.with_body do
5050
- help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/profile/index', anchor: 'add-details-to-your-profile-with-a-readme') }
51-
= html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
51+
= html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more%{help_link_end}.')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
5252

5353
- if include_description
5454
.form-group

app/views/projects/pages/_waiting.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.empty-state
22
.row.gl-align-items-center.gl-justify-content-center
33
.order-md-2
4-
= image_tag 'illustrations/pipelines_pending.svg'
4+
= image_tag 'illustrations/empty-state/empty-pipeline-md.svg'
55
.row.gl-align-items-center.gl-justify-content-center
66
.text-content.gl-text-center.order-md-1
77
%h4= s_("GitLabPages|Waiting for the Pages Pipeline to complete...")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
class RemoveTimeFormatIn24hColumn < Gitlab::Database::Migration[2.1]
4+
enable_lock_retries!
5+
6+
def up
7+
remove_column :user_preferences, :time_format_in_24h
8+
end
9+
10+
def down
11+
# rubocop:disable Migration/SchemaAdditionMethodsNoPost
12+
add_column :user_preferences, :time_format_in_24h, :boolean
13+
# rubocop:enable Migration/SchemaAdditionMethodsNoPost
14+
end
15+
end

db/schema_migrations/20230518121320

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
34f1874ef8bab4bee142d12e78c84697e8889e6fc6d5b4dfbcdc6e7ed16861b5

db/structure.sql

-1
Original file line numberDiff line numberDiff line change
@@ -23548,7 +23548,6 @@ CREATE TABLE user_preferences (
2354823548
first_day_of_week integer,
2354923549
timezone character varying,
2355023550
time_display_relative boolean,
23551-
time_format_in_24h boolean,
2355223551
projects_sort character varying(64),
2355323552
show_whitespace_in_diffs boolean DEFAULT true NOT NULL,
2355423553
sourcegraph_enabled boolean,

doc/api/api_resources.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The following API resources are available in the project context:
5656
| [Issues Statistics](issues_statistics.md) | `/projects/:id/issues_statistics` (also available for groups and standalone) |
5757
| [Issues](issues.md) | `/projects/:id/issues` (also available for groups and standalone) |
5858
| [Iterations](iterations.md) **(PREMIUM)** | `/projects/:id/iterations` (also available for groups) |
59+
| [Project CI/CD job token scope](project_job_token_scopes.md) | `/projects/:id/job_token_scope` |
5960
| [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` |
6061
| [Jobs Artifacts](job_artifacts.md) | `/projects/:id/jobs/:job_id/artifacts` |
6162
| [Labels](labels.md) | `/projects/:id/labels` |

0 commit comments

Comments
 (0)