Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-06-06 21:08:22 +00:00
parent 2d18100383
commit 1f563de514
10 changed files with 32 additions and 30 deletions

View file

@ -1 +1 @@
14.7.1 14.7.3

View file

@ -13,11 +13,10 @@ module Ci
def execute def execute
return unless @user.present? && @user.can?(:update_runners_registration_token, scope) return unless @user.present? && @user.can?(:update_runners_registration_token, scope)
case scope if scope.respond_to?(:runners_registration_token)
when ::ApplicationSetting
scope.reset_runners_registration_token! scope.reset_runners_registration_token!
ApplicationSetting.current_without_cache.runners_registration_token scope.runners_registration_token
when ::Group, ::Project else
scope.reset_runners_token! scope.reset_runners_token!
scope.runners_token scope.runners_token
end end

View file

@ -234,9 +234,9 @@ export default {
``` ```
If the extension needs to poll multiple endpoints at the same time, then `fetchMultiData` If the extension needs to poll multiple endpoints at the same time, then `fetchMultiData`
can be used to return an array of functions. A new `poll` object will be created for each can be used to return an array of functions. A new `poll` object is created for each
endpoint and they will be polled separately. Once all endpoints are resolved, polling will endpoint and they are polled separately. After all endpoints are resolved, polling is
be stopped and `setCollapsedData` will be called with an array of `response.data`. stopped and `setCollapsedData` is called with an array of `response.data`.
```javascript ```javascript
export default { export default {

View file

@ -92,8 +92,8 @@ Commit message templates support these variables:
Any line containing only an empty variable is removed. If the line to be removed is both Any line containing only an empty variable is removed. If the line to be removed is both
preceded and followed by an empty line, the preceding empty line is also removed. preceded and followed by an empty line, the preceding empty line is also removed.
After you edit a commit message on an open merge request, GitLab will After you edit a commit message on an open merge request, GitLab
not automatically update the commit message again. automatically updates the commit message again.
To restore the commit message to the project template, reload the page. To restore the commit message to the project template, reload the page.
## Related topics ## Related topics

View file

@ -45,9 +45,13 @@ If your group contains subgroups, this view also displays merge requests from th
To view all merge requests assigned to you: To view all merge requests assigned to you:
<!-- vale gitlab.FirstPerson = NO -->
1. On the top bar, put your cursor in the **Search** box. 1. On the top bar, put your cursor in the **Search** box.
1. From the dropdown list, select **Merge requests assigned to me**. 1. From the dropdown list, select **Merge requests assigned to me**.
<!-- vale gitlab.FirstPerson = YES -->
Or: Or:
- To use a [keyboard shortcut](../../shortcuts.md), press <kbd>Shift</kbd> + <kbd>m</kbd>. - To use a [keyboard shortcut](../../shortcuts.md), press <kbd>Shift</kbd> + <kbd>m</kbd>.

View file

@ -89,7 +89,7 @@ comment itself.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/8225) in GitLab 13.10. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/8225) in GitLab 13.10.
If you have a review in progress, you will be presented with the option to **Add to review**: If you have a review in progress, you are presented with the option to **Add to review**:
![New thread](img/mr_review_new_comment_v13_11.png) ![New thread](img/mr_review_new_comment_v13_11.png)

View file

@ -82,9 +82,13 @@ in four backticks instead of three:
GitLab uses a default commit message GitLab uses a default commit message
when applying suggestions: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)` when applying suggestions: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)`
<!-- vale gitlab.BadPlurals = NO -->
For example, consider that a user applied 3 suggestions to 2 different files, the For example, consider that a user applied 3 suggestions to 2 different files, the
default commit message is: **Apply 3 suggestion(s) to 2 file(s)** default commit message is: **Apply 3 suggestion(s) to 2 file(s)**
<!-- vale gitlab.BadPlurals = YES -->
These commit messages can be customized to follow any guidelines you might have. These commit messages can be customized to follow any guidelines you might have.
To do so, expand the **Merge requests** tab within your project's **General** To do so, expand the **Merge requests** tab within your project's **General**
settings and change the **Merge suggestions** text: settings and change the **Merge suggestions** text:

View file

@ -13,31 +13,25 @@ module QA
it( it(
'is determined based on forward:pipeline_variables condition', 'is determined based on forward:pipeline_variables condition',
:aggregate_failures, :aggregate_failures,
:transient,
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/361400',
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/360745' testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/360745'
) do ) do
# Due to long runtime, using 5 times trials instead of default 10 times start_pipeline_via_api_with_variable
5.times do |i| wait_for_pipelines
QA::Runtime::Logger.info("API pipeline variable inheritance transient bug test - Trial #{i + 1}")
start_pipeline_via_api_with_variable(i + 1)
wait_for_pipelines
# When forward:pipeline_variables is true # When forward:pipeline_variables is true
expect_downstream_pipeline_to_inherit_variable expect_downstream_pipeline_to_inherit_variable
# When forward:pipeline_variables is false # When forward:pipeline_variables is false
expect_downstream_pipeline_not_to_inherit_variable(upstream_project, 'child2_trigger') expect_downstream_pipeline_not_to_inherit_variable(upstream_project, 'child2_trigger')
# When forward:pipeline_variables is default # When forward:pipeline_variables is default
expect_downstream_pipeline_not_to_inherit_variable(downstream1_project, 'downstream1_trigger') expect_downstream_pipeline_not_to_inherit_variable(downstream1_project, 'downstream1_trigger')
end
end end
def start_pipeline_via_api_with_variable(expected_size) def start_pipeline_via_api_with_variable
# Wait for 1st or previous pipeline to finish # Wait for 1st pipeline to finish
Support::Waiter.wait_until do Support::Waiter.wait_until do
upstream_project.pipelines.size == expected_size && upstream_pipeline.status == 'success' upstream_project.pipelines.size == 1 && upstream_pipeline.status == 'success'
end end
Resource::Pipeline.fabricate_via_api! do |pipeline| Resource::Pipeline.fabricate_via_api! do |pipeline|
@ -46,7 +40,7 @@ module QA
end end
# Wait for this pipeline to be created # Wait for this pipeline to be created
Support::Waiter.wait_until { upstream_project.pipelines.size > expected_size } Support::Waiter.wait_until { upstream_project.pipelines.size > 1 }
end end
def upstream_ci_file def upstream_ci_file

View file

@ -9,7 +9,7 @@ RSpec.describe 'Pipeline Schedules', :js do
let(:scope) { nil } let(:scope) { nil }
let!(:user) { create(:user) } let!(:user) { create(:user) }
context 'logged in as the pipeline scheduler owner' do context 'logged in as the pipeline schedule owner' do
before do before do
stub_feature_flags(bootstrap_confirmation_modals: false) stub_feature_flags(bootstrap_confirmation_modals: false)
project.add_developer(user) project.add_developer(user)

View file

@ -66,6 +66,7 @@ RSpec.describe Types::BaseField do
resolver_class: resolver) resolver_class: resolver)
expect(Ability).to receive(:allowed?).with(current_user, :foo, object).and_return(false) expect(Ability).to receive(:allowed?).with(current_user, :foo, object).and_return(false)
expect(resolver).not_to receive(:authorized?)
expect(field).not_to be_authorized(object, nil, ctx) expect(field).not_to be_authorized(object, nil, ctx)
end end