Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-06-21 21:09:41 +00:00
parent f0ccbae4dc
commit c097ca59a1
11 changed files with 38 additions and 15 deletions

View File

@ -878,8 +878,8 @@ GEM
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.7.2)
oauth2 (~> 1.4)
omniauth-oauth2 (1.7.3)
oauth2 (>= 1.4, < 3)
omniauth (>= 1.9, < 3)
omniauth-oauth2-generic (0.2.2)
omniauth-oauth2 (~> 1.0)

View File

@ -42,7 +42,7 @@ export default {
modalId: CANARY_UPDATE_MODAL,
actionPrimary: {
text: s__('CanaryIngress|Change ratio'),
attributes: [{ variant: 'info' }],
attributes: [{ variant: 'confirm' }],
},
actionCancel: { text: __('Cancel') },
static: true,

View File

@ -133,6 +133,8 @@ export default {
signal: this.activeApiRequestAbortController.signal,
});
this.apiLoading = false;
if (exists) {
if (suggests.length) {
return Promise.resolve({ exists, suggests });
@ -148,14 +150,14 @@ export default {
return Promise.resolve({ exists, suggests });
} catch (error) {
if (!axios.isCancel(error)) {
this.apiLoading = false;
createAlert({
message: this.$options.i18n.apiErrorMessage,
});
}
return Promise.reject();
} finally {
this.apiLoading = false;
}
},
handlePathInput(value) {

View File

@ -45,11 +45,13 @@
= f.label :email, class: 'label-bold'
= f.email_field :email,
value: @invite_email,
class: 'form-control gl-form-input middle',
class: 'form-control gl-form-input middle js-validate-email',
data: { qa_selector: 'new_user_email_field' },
required: true,
title: _('Please provide a valid email address.')
%p.gl-field-hint.text-secondary= _('We recommend a work email address.')
-# This is used for providing entry to Jihu on email verification
= render_if_exists 'devise/shared/signup_email_additional_info'
.form-group.gl-mb-5#password-strength
= f.label :password, class: 'label-bold'
= f.password_field :password,

View File

@ -7,7 +7,7 @@
%p
= _("Applying a template will replace the existing issue description. Any changes you have made will be lost.")
%button.js-override-template.btn.gl-button.btn-confirm.mr-2{ type: 'button' }
= render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'gl-mr-3 js-override-template' }) do
= _("Apply template")
%button.js-close-btn.js-cancel-btn.btn.gl-button.btn-default{ type: 'button' }
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-close-btn js-cancel-btn' }) do
= _("Cancel")

View File

@ -175,6 +175,7 @@ When the user is authenticated and `simple` is not set this returns something li
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
@ -282,6 +283,7 @@ When the user is authenticated and `simple` is not set this returns something li
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 0,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
@ -470,6 +472,7 @@ GET /users/:user_id/projects
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
@ -577,6 +580,7 @@ GET /users/:user_id/projects
"runners_token": "b8547b1dc37721d05889db52fa2f02",
"ci_default_git_depth": 0,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
@ -983,6 +987,7 @@ GET /projects/:id
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [
{
@ -1422,6 +1427,7 @@ Supported attributes:
| `ci_config_path` | string | **{dotted-circle}** No | The path to CI configuration file. |
| `ci_default_git_depth` | integer | **{dotted-circle}** No | Default number of revisions for [shallow cloning](../ci/pipelines/settings.md#limit-the-number-of-changes-fetched-during-clone). |
| `ci_forward_deployment_enabled` | boolean | **{dotted-circle}** No | When a new deployment job starts, [skip older deployment jobs](../ci/pipelines/settings.md#skip-outdated-deployment-jobs) that are still pending |
| `ci_separated_caches` | boolean | **{dotted-circle}** No | Set whether or not caches should be [separated](../ci/caching/index.md#cache-key-names) by branch protection status. |
| `container_expiration_policy_attributes` | hash | **{dotted-circle}** No | Update the image cleanup policy for this project. Accepts: `cadence` (string), `keep_n` (integer), `older_than` (string), `name_regex` (string), `name_regex_delete` (string), `name_regex_keep` (string), `enabled` (boolean). |
| `container_registry_access_level` | string | **{dotted-circle}** No | Set visibility of container registry, for this project, to one of `disabled`, `private` or `enabled`. |
| `container_registry_enabled` | boolean | **{dotted-circle}** No | _(Deprecated)_ Enable container registry for this project. Use `container_registry_access_level` instead. |
@ -1997,6 +2003,7 @@ Example response:
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
@ -2122,6 +2129,7 @@ Example response:
"runners_token": "b8bc4a7a29eb76ea83cf79e4908c2b",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"ci_separated_caches": true,
"public_jobs": true,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,

View File

@ -96,6 +96,7 @@ module API
params :optional_update_params_ce do
optional :ci_forward_deployment_enabled, type: Boolean, desc: 'Skip older deployment jobs that are still pending'
optional :ci_separated_caches, type: Boolean, desc: 'Enable or disable separated caches based on branch protection.'
optional :restrict_user_defined_variables, type: Boolean, desc: 'Restrict use of user-defined variables when triggering a pipeline'
end
@ -130,6 +131,7 @@ module API
:ci_config_path,
:ci_default_git_depth,
:ci_forward_deployment_enabled,
:ci_separated_caches,
:container_registry_access_level,
:container_expiration_policy_attributes,
:default_branch,

View File

@ -47,7 +47,7 @@ describe('/environments/components/canary_update_modal.vue', () => {
modalId: 'confirm-canary-change',
actionPrimary: {
text: 'Change ratio',
attributes: [{ variant: 'info' }],
attributes: [{ variant: 'confirm' }],
},
actionCancel: { text: 'Cancel' },
});

View File

@ -1,3 +1,4 @@
import { nextTick } from 'vue';
import { merge } from 'lodash';
import { GlAlert } from '@gitlab/ui';
import { mountExtended, extendedWrapper } from 'helpers/vue_test_utils_helper';
@ -50,17 +51,17 @@ describe('GroupNameAndPath', () => {
const findAlert = () => extendedWrapper(wrapper.findComponent(GlAlert));
const apiMockAvailablePath = () => {
getGroupPathAvailability.mockResolvedValue({
getGroupPathAvailability.mockResolvedValueOnce({
data: { exists: false, suggests: [] },
});
};
const apiMockUnavailablePath = (suggests = [mockGroupUrlSuggested]) => {
getGroupPathAvailability.mockResolvedValue({
getGroupPathAvailability.mockResolvedValueOnce({
data: { exists: true, suggests },
});
};
const apiMockLoading = () => {
getGroupPathAvailability.mockImplementation(() => new Promise(() => {}));
getGroupPathAvailability.mockImplementationOnce(() => new Promise(() => {}));
};
const expectLoadingMessageExists = () => {
@ -169,7 +170,7 @@ describe('GroupNameAndPath', () => {
describe('when API call fails', () => {
it('calls `createAlert`', async () => {
getGroupPathAvailability.mockRejectedValue({});
getGroupPathAvailability.mockRejectedValueOnce({});
createComponent();
@ -184,14 +185,20 @@ describe('GroupNameAndPath', () => {
describe('when multiple API calls are in-flight', () => {
it('aborts the first API call and resolves second API call', async () => {
apiMockLoading();
getGroupPathAvailability.mockRejectedValueOnce({ __CANCEL__: true });
apiMockUnavailablePath();
const abortSpy = jest.spyOn(AbortController.prototype, 'abort');
createComponent();
await findGroupNameField().setValue('Foo');
await findGroupNameField().setValue(mockGroupName);
// Wait for re-render to ensure loading message is still there
await nextTick();
expectLoadingMessageExists();
await waitForPromises();
expect(createAlert).not.toHaveBeenCalled();

View File

@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'OmniAuth::Strategies::OAuth2' do
it 'verifies the gem version' do
current_version = OmniAuth::OAuth2::VERSION
expected_version = '1.7.2'
expected_version = '1.7.3'
expect(current_version).to eq(expected_version), <<~EOF
New version #{current_version} of the `omniauth-oauth2` gem detected!

View File

@ -2388,6 +2388,7 @@ RSpec.describe API::Projects do
expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to eq(project.only_allow_merge_if_all_discussions_are_resolved)
expect(json_response['ci_default_git_depth']).to eq(project.ci_default_git_depth)
expect(json_response['ci_forward_deployment_enabled']).to eq(project.ci_forward_deployment_enabled)
expect(json_response['ci_separated_caches']).to eq(project.ci_separated_caches)
expect(json_response['merge_method']).to eq(project.merge_method.to_s)
expect(json_response['squash_option']).to eq(project.squash_option.to_s)
expect(json_response['readme_url']).to eq(project.readme_url)
@ -3652,6 +3653,7 @@ RSpec.describe API::Projects do
merge_method: 'ff',
ci_default_git_depth: 20,
ci_forward_deployment_enabled: false,
ci_separated_caches: false,
description: 'new description' }
put api("/projects/#{project3.id}", user4), params: project_param