Skip to content

Commit 28fa2fa

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 5e0b1a9 commit 28fa2fa

File tree

33 files changed

+177
-92
lines changed

33 files changed

+177
-92
lines changed

app/assets/javascripts/deploy_freeze/store/mutations.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Vue from 'vue';
21
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
32
import { formatTimezone } from '~/lib/utils/datetime_utility';
43
import * as types from './mutation_types';
@@ -21,7 +20,7 @@ const setFreezePeriodIsDeleting = (state, id, isDeleting) => {
2120
return;
2221
}
2322

24-
Vue.set(freezePeriod, 'isDeleting', isDeleting);
23+
freezePeriod.isDeleting = isDeleting;
2524
};
2625

2726
export default {

app/assets/javascripts/projects/settings/components/access_dropdown.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const i18n = {
2020
groupsSectionHeader: s__('AccessDropdown|Groups'),
2121
usersSectionHeader: s__('AccessDropdown|Users'),
2222
noRole: s__('AccessDropdown|No role'),
23-
deployKeysSectionHeader: s__('AccessDropdown|Deploy Keys'),
23+
deployKeysSectionHeader: s__('AccessDropdown|Deploy keys'),
2424
ownedBy: __('Owned by %{image_tag}'),
2525
};
2626

app/assets/javascripts/work_items/components/work_item_ancestors/disclosure_hierarchy.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default {
9595
<disclosure-hierarchy-item v-if="!isMobile" :item="firstItem" :item-id="itemId(0)">
9696
<slot :item="firstItem" :item-id="itemId(0)"></slot>
9797
</disclosure-hierarchy-item>
98-
<li class="disclosure-hierarchy-item">
98+
<li v-if="middleItems.length > 0" class="disclosure-hierarchy-item">
9999
<gl-disclosure-dropdown :items="middleItems">
100100
<template #toggle>
101101
<button

app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue

+10-2
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default {
105105
workItemTypes: [],
106106
workItemsToAdd: [],
107107
error: null,
108+
isInputValid: true,
108109
search: '',
109110
selectedProject: null,
110111
childToCreateTitle: null,
@@ -266,6 +267,7 @@ export default {
266267
},
267268
unsetError() {
268269
this.error = null;
270+
this.isInputValid = true;
269271
},
270272
addChild() {
271273
this.submitInProgress = true;
@@ -291,6 +293,7 @@ export default {
291293
})
292294
.catch(() => {
293295
this.error = this.$options.i18n.addChildErrorMessage;
296+
this.isInputValid = false;
294297
})
295298
.finally(() => {
296299
this.search = '';
@@ -325,6 +328,7 @@ export default {
325328
})
326329
.catch(() => {
327330
this.error = this.$options.i18n.createChildErrorMessage;
331+
this.isInputValid = false;
328332
})
329333
.finally(() => {
330334
this.search = '';
@@ -361,11 +365,15 @@ export default {
361365
class="gl-w-full"
362366
:label="$options.i18n.titleInputLabel"
363367
:description="$options.i18n.titleInputValidationMessage"
368+
:invalid-feedback="error"
369+
:state="isInputValid"
370+
data-testid="work-items-create-form-group"
364371
>
365372
<gl-form-input
366373
ref="wiTitleInput"
367374
v-model="search"
368375
:placeholder="$options.i18n.titleInputPlaceholder"
376+
:state="isInputValid"
369377
maxlength="255"
370378
class="gl-mb-3"
371379
autofocus
@@ -389,7 +397,7 @@ export default {
389397
ref="confidentialityCheckbox"
390398
v-model="confidential"
391399
name="isConfidential"
392-
class="gl-md-mt-5 gl-mb-5 gl-md-mb-3!"
400+
class="gl-mb-5 gl-md-mb-3!"
393401
:disabled="parentConfidential"
394402
>{{ confidentialityCheckboxLabel }}</gl-form-checkbox
395403
>
@@ -417,7 +425,7 @@ export default {
417425
>
418426
{{ workItemsToAddInvalidMessage }}
419427
</div>
420-
<div v-if="error" class="gl-text-red-500" data-testid="work-items-error">
428+
<div v-if="error" class="gl-text-red-500 gl-mt-3" data-testid="work-items-error">
421429
{{ error }}
422430
</div>
423431
</div>

app/assets/javascripts/work_items/graphql/group_work_items.query.graphql

+13-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@ query groupWorkItems(
44
$types: [IssueType!]
55
$in: [IssuableSearchableField!]
66
$includeAncestors: Boolean = false
7+
$iid: String = null
8+
$searchByIid: Boolean = false
9+
$searchByText: Boolean = true
710
) {
811
workspace: group(fullPath: $fullPath) {
912
id
10-
workItems(search: $searchTerm, types: $types, in: $in, includeAncestors: $includeAncestors) {
13+
workItems(search: $searchTerm, types: $types, in: $in, includeAncestors: $includeAncestors)
14+
@include(if: $searchByText) {
15+
nodes {
16+
id
17+
iid
18+
title
19+
confidential
20+
}
21+
}
22+
workItemsByIid: workItems(iid: $iid, types: $types) @include(if: $searchByIid) {
1123
nodes {
1224
id
1325
iid

app/controllers/jira_connect/branches_controller.rb

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
# frozen_string_literal: true
22

33
class JiraConnect::BranchesController < JiraConnect::ApplicationController
4-
# before_action :authenticate_user!, only: :new
4+
before_action :authenticate_user!, only: :new
55
skip_before_action :verify_atlassian_jwt!, only: :new
66

77
def new
8-
# move authenticate_user! to a before_action when we remove the jira_connect_proxy_create_branch feature flag
9-
authenticate_user! if Feature.enabled?(:jira_connect_proxy_create_branch, current_user)
10-
118
@new_branch_data = new_branch_data
129
end
1310

1411
# If the GitLab for Jira Cloud app was installed from the Jira marketplace and points to a self-managed instance,
1512
# we route the user to the self-managed instance, otherwise we redirect to :new
1613
def route
17-
if Feature.enabled?(:jira_connect_proxy_create_branch, current_user) && current_jira_installation.proxy?
14+
if current_jira_installation.proxy?
1815
redirect_to "#{current_jira_installation.create_branch_url}?#{request.query_string}"
1916

2017
return

app/controllers/search_controller.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ def payload_metadata
242242
metadata['meta.search.project_id'] = params[:project_id]
243243
metadata['meta.search.scope'] = params[:scope] || @scope
244244
metadata['meta.search.page'] = params[:page] || '1'
245-
metadata['meta.search.filters.confidential'] = params[:confidential]
246-
metadata['meta.search.filters.state'] = params[:state]
245+
metadata['meta.search.filters.confidential'] = filter_params[:confidential]
246+
metadata['meta.search.filters.state'] = filter_params[:state]
247247
metadata['meta.search.force_search_results'] = params[:force_search_results]
248248
metadata['meta.search.project_ids'] = params[:project_ids]
249-
metadata['meta.search.filters.language'] = params[:language]
249+
metadata['meta.search.filters.language'] = filter_params[:language]
250250
metadata['meta.search.type'] = @search_type if @search_type.present?
251251
metadata['meta.search.level'] = @search_level if @search_level.present?
252252
metadata[:global_search_duration_s] = @global_search_duration_s if @global_search_duration_s.present?
@@ -307,6 +307,10 @@ def tracking_project_source
307307
def search_type
308308
search_service.search_type
309309
end
310+
311+
def filter_params
312+
params.permit(:confidential, :state, language: [])
313+
end
310314
end
311315

312316
SearchController.prepend_mod_with('SearchController')
+9-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
- add_to_breadcrumbs _('Deploy Keys'), admin_deploy_keys_path
2-
- page_title _('Edit Deploy Key')
1+
- add_to_breadcrumbs _('Deploy keys'), admin_deploy_keys_path
2+
- page_title _('Edit deploy key')
33

4-
%h1.page-title.gl-font-size-h-display= _('Edit public deploy key')
5-
%hr
4+
= render ::Layouts::PageHeadingComponent.new(_('Edit public deploy key'))
65

7-
%div
8-
= gitlab_ui_form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f|
9-
= render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key }
10-
.form-actions
11-
= f.submit _('Save changes'), pajamas_button: true
12-
= render Pajamas::ButtonComponent.new(href: admin_deploy_keys_path) do
13-
= _('Cancel')
6+
= gitlab_ui_form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f|
7+
= render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key }
8+
.gl-flex.gl-gap-3
9+
= f.submit _('Save changes'), pajamas_button: true
10+
= render Pajamas::ButtonComponent.new(href: admin_deploy_keys_path) do
11+
= _('Cancel')
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
- page_title _('Deploy Keys')
1+
- page_title _('Deploy keys')
2+
3+
= render ::Layouts::PageHeadingComponent.new(_('Deploy keys'))
24

35
#js-admin-deploy-keys-table{ data: admin_deploy_keys_data }
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
- add_to_breadcrumbs _('Deploy Keys'), admin_deploy_keys_path
2-
- page_title _('New Deploy Key')
1+
- add_to_breadcrumbs _('Deploy keys'), admin_deploy_keys_path
2+
- page_title _('New deploy key')
33

4-
%h1.page-title.gl-font-size-h-display= _('New public deploy key')
4+
= render ::Layouts::PageHeadingComponent.new(_('New public deploy key'))
55

66
= gitlab_ui_form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f|
77
= render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key }
8-
.gl-display-flex.gl-mt-6.gl-gap-3
8+
.gl-display-flex.gl-gap-3
99
= f.submit 'Create', pajamas_button: true
1010
= render Pajamas::ButtonComponent.new(href: admin_deploy_keys_path) do
1111
= _('Cancel')

app/views/projects/deploy_keys/edit.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
= gitlab_ui_form_for [@project, @deploy_key], include_id: false, html: { class: 'js-requires-input' } do |f|
55
= render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key }
6-
.gl-display-flex.gl-mt-6.gl-gap-3
6+
.gl-display-flex.gl-gap-3
77
= f.submit _('Save changes'), pajamas_button: true
88
= link_button_to _('Cancel'), project_settings_repository_path(@project, anchor: 'js-deploy-keys-settings')

config/feature_flags/gitlab_com_derisk/jira_connect_proxy_create_branch.yml

-9
This file was deleted.

doc/development/sidekiq/compatibility_across_updates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ We should treat this similar to adding a new worker. That means we only start sc
226226
To ensure backward and forward compatibility between consecutive versions
227227
of the application, follow these steps over three minor releases:
228228

229-
1. Create the newly named worker, and have the old worker call the new worker's `#perform` method. Inroduce a feature flag to control when we start scheduling the new worker. (Release M)
229+
1. Create the newly named worker, and have the old worker call the new worker's `#perform` method. Introduce a feature flag to control when we start scheduling the new worker. (Release M)
230230

231231
Any old worker jobs that are still in the queue will delegate to the new worker. When this version is deployed, it is no longer relevant which version of the job is scheduled or which Sidekiq handles it, an old-Sidekiq will use the old worker's full implementation, a new-Sidekiq will delegate to the new worker.
232232

doc/development/sidekiq/index.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,16 @@ If you need to perform an action when a job fails after all of its retry attempt
132132

133133
```ruby
134134
sidekiq_retries_exhausted do |msg, ex|
135-
project = Project.find(msg['args'].first)
135+
project = Project.find_by_id(msg['args'].first)
136+
return unless project
137+
136138
project.perform_a_rollback # handle the permanent failure
137139
end
138140

139141
def perform(project_id)
140-
project = Project.find(project_id)
142+
project = Project.find_by_id(project_id)
143+
return unless project
144+
141145
project.some_action # throws an exception
142146
end
143147
```

doc/integration/jira/development_panel.md

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ This table shows the features available with the Jira DVCS connector and the Git
3737
| Sync deployments | **{dotted-circle}** No | **{check-circle}** Yes |
3838
| Sync feature flags | **{dotted-circle}** No | **{check-circle}** Yes |
3939
| Sync interval | Up to 60 minutes | Real time |
40-
| Create branches | **{dotted-circle}** No | **{check-circle}** Yes (GitLab.com only) |
4140
| Delete branches | **{dotted-circle}** No | **{check-circle}** Yes |
4241
| Create a merge request from a branch | **{check-circle}** Yes | **{check-circle}** Yes |
4342
| Create a branch from a Jira issue | **{dotted-circle}** No | **{check-circle}** Yes |

doc/security/hardening_application_recommendations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The adjustments help limit pushes to established and authorized users.
4646
## Deploy keys
4747

4848
1. On the left sidebar, at the bottom, select **Admin area**.
49-
1. Select **Deploy Keys**.
49+
1. Select **Deploy keys**.
5050

5151
Public deploy keys at are used to give read or read/write access to
5252
**all** projects on the instance, and are intended for remote automation to access

doc/user/project/deploy_keys/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Prerequisites:
120120
To create a public deploy key:
121121

122122
1. On the left sidebar, at the bottom, select **Admin area**.
123-
1. Select **Deploy Keys**.
123+
1. Select **Deploy keys**.
124124
1. Select **New deploy key**.
125125
1. Complete the fields.
126126
- Use a meaningful description for **Name**. For example, include the name of the external host

doc/user/workspace/configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ When creating a workspace in a project, one of the following errors might occur:
173173
- `You can't create a workspace for this project` when you attempt to create the workspace from **Workspaces** on the left sidebar.
174174
- `To set up this feature, contact your administrator.` when you attempt to create the workspace in a specific project using the `Edit` function.
175175
- An expected agent is not be present in the list of available agents.
176+
176177
Possible reasons for this error are:
177178

178179
- The user does not have at least Developer role for the workspace project and/or the agent project. To resolve this issue, ask the respective group or project owner to grant you access.

lib/gitlab/search/params.rb

+17-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Params
1818
alias_method :term, :query_string
1919

2020
def initialize(params, detect_abuse: true)
21-
@raw_params = convert_all_boolean_params(params)
21+
@raw_params = process_params(params)
2222
@query_string = strip_surrounding_whitespace(@raw_params[:search] || @raw_params[:term])
2323
@detect_abuse = detect_abuse
2424
@abuse_detection = AbuseDetection.new(self) if @detect_abuse
@@ -94,6 +94,22 @@ def strip_surrounding_whitespace(obj)
9494
obj.to_s.strip
9595
end
9696

97+
def process_params(params)
98+
processed_params = convert_all_boolean_params(params)
99+
convert_not_params(processed_params)
100+
end
101+
102+
def convert_not_params(params)
103+
not_params = params.delete(:not)
104+
return params unless not_params
105+
106+
not_params.each do |key, value|
107+
params[:"not_#{key}"] = value
108+
end
109+
110+
params
111+
end
112+
97113
def convert_all_boolean_params(params)
98114
converted_params = params.is_a?(Hash) ? params.with_indifferent_access : params.dup
99115

lib/sidebars/admin/menus/deploy_keys_menu.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def link
1111

1212
override :title
1313
def title
14-
s_('Admin|Deploy Keys')
14+
s_('Admin|Deploy keys')
1515
end
1616

1717
override :sprite_icon

0 commit comments

Comments
 (0)