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

Add latest changes from gitlab-org/gitlab@master

parent e0bd3a45
No related branches found
No related tags found
No related merge requests found
Showing
with 125 additions and 36 deletions
Loading
Loading
@@ -355,7 +355,7 @@ group :development, :test do
gem 'fuubar', '~> 2.2.0'
 
gem 'database_cleaner', '~> 1.7.0'
gem 'factory_bot_rails', '~> 4.8.2'
gem 'factory_bot_rails', '~> 5.1.0'
gem 'rspec-rails', '~> 3.8.0'
gem 'rspec-retry', '~> 0.6.1'
gem 'rspec_profiling', '~> 0.0.5'
Loading
Loading
Loading
Loading
@@ -254,7 +254,7 @@ GEM
mail (~> 2.7)
encryptor (3.0.0)
equalizer (0.0.11)
erubi (1.8.0)
erubi (1.9.0)
escape_utils (1.2.1)
et-orbi (1.2.1)
tzinfo
Loading
Loading
@@ -264,11 +264,11 @@ GEM
expression_parser (0.9.0)
extended-markdown-filter (0.6.0)
html-pipeline (~> 2.0)
factory_bot (4.8.2)
activesupport (>= 3.0.0)
factory_bot_rails (4.8.2)
factory_bot (~> 4.8.2)
railties (>= 3.0.0)
factory_bot (5.1.0)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.0)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.0.0)
Loading
Loading
@@ -565,7 +565,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.2.3)
loofah (2.3.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Loading
Loading
@@ -783,7 +783,7 @@ GEM
thor (>= 0.19.0, < 2.0)
rainbow (3.0.0)
raindrops (0.19.0)
rake (12.3.2)
rake (12.3.3)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
Loading
Loading
@@ -1144,7 +1144,7 @@ DEPENDENCIES
email_reply_trimmer (~> 0.1)
email_spec (~> 2.2.0)
escape_utils (~> 1.1)
factory_bot_rails (~> 4.8.2)
factory_bot_rails (~> 5.1.0)
faraday (~> 0.12)
faraday_middleware-aws-signers-v4
fast_blank
Loading
Loading
Loading
Loading
@@ -40,13 +40,17 @@ const createFlashEl = (message, type) => `
<div class="flash-content flash-${type} rounded">
<div class="flash-text">
${_.escape(message)}
${spriteIcon('close', 'close-icon')}
<div class="close-icon-wrapper js-close-icon">
${spriteIcon('close', 'close-icon')}
</div>
</div>
</div>
`;
 
const removeFlashClickListener = (flashEl, fadeTransition) => {
flashEl.addEventListener('click', () => hideFlash(flashEl, fadeTransition));
flashEl
.querySelector('.js-close-icon')
.addEventListener('click', () => hideFlash(flashEl, fadeTransition));
};
 
/*
Loading
Loading
@@ -78,7 +82,6 @@ const createFlash = function createFlash(
flashContainer.innerHTML = createFlashEl(message, type);
 
const flashEl = flashContainer.querySelector(`.flash-${type}`);
removeFlashClickListener(flashEl, fadeTransition);
 
if (actionConfig) {
flashEl.innerHTML += createAction(actionConfig);
Loading
Loading
@@ -90,6 +93,8 @@ const createFlash = function createFlash(
}
}
 
removeFlashClickListener(flashEl, fadeTransition);
flashContainer.style.display = 'block';
 
if (addBodyClass) document.body.classList.add('flash-shown');
Loading
Loading
$notification-box-shadow-color: rgba(0, 0, 0, 0.25);
 
.flash-container {
cursor: pointer;
margin: 0;
margin-bottom: $gl-padding;
font-size: 14px;
Loading
Loading
@@ -19,12 +18,17 @@ $notification-box-shadow-color: rgba(0, 0, 0, 0.25);
}
}
 
.close-icon {
width: 16px;
height: 16px;
.close-icon-wrapper {
padding: ($gl-btn-padding + $gl-padding-4) $gl-padding $gl-btn-padding;
position: absolute;
right: $gl-padding;
top: $gl-padding;
right: 0;
top: 0;
cursor: pointer;
.close-icon {
width: 16px;
height: 16px;
}
}
 
.flash-notice,
Loading
Loading
# frozen_string_literal: true
module Types
class ExtendedIssueType < IssueType
graphql_name 'ExtendedIssue'
authorize :read_issue
expose_permissions Types::PermissionTypes::Issue
present_using IssuePresenter
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Boolean flag for whether the currently logged in user is subscribed to this issue'
end
end
Loading
Loading
@@ -49,6 +49,11 @@ module Types
field :web_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :relative_position, GraphQL::INT_TYPE, null: true # rubocop:disable Graphql/Descriptions
 
field :epic, ::Types::EpicType, null: true, description: 'The epic to which issue belongs'
field :participants, Types::UserType.connection_type, null: true, complexity: 5, description: 'List of participants for the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false, description: 'The time estimate on the issue'
field :total_time_spent, GraphQL::INT_TYPE, null: false, description: 'Total time reported as spent on the issue'
field :closed_at, Types::TimeType, null: true # rubocop:disable Graphql/Descriptions
 
field :created_at, Types::TimeType, null: false # rubocop:disable Graphql/Descriptions
Loading
Loading
Loading
Loading
@@ -92,7 +92,7 @@ module Types
resolver: Resolvers::IssuesResolver
 
field :issue, # rubocop:disable Graphql/Descriptions
Types::IssueType,
Types::ExtendedIssueType,
null: true,
resolver: Resolvers::IssuesResolver.single
 
Loading
Loading
Loading
Loading
@@ -11,6 +11,10 @@ class IssuePresenter < Gitlab::View::Presenter::Delegated
url_builder.issue_path(issue)
end
 
def subscribed?
issue.subscribed?(current_user, issue.project)
end
private
 
def url_builder
Loading
Loading
Loading
Loading
@@ -5,4 +5,5 @@
- if value
%div{ class: "flash-content flash-#{key} rounded" }
%span= value
= sprite_icon('close', size: 16, css_class: 'close-icon')
%div{ class: "close-icon-wrapper js-close-icon" }
= sprite_icon('close', size: 16, css_class: 'close-icon')
Loading
Loading
@@ -28,7 +28,7 @@ restart()
stop
fi
killall
start_sidekiq -d -L $sidekiq_logfile >> $sidekiq_logfile 2>&1
start_sidekiq -P $sidekiq_pidfile -d -L $sidekiq_logfile >> $sidekiq_logfile 2>&1
}
 
start_no_deamonize()
Loading
Loading
@@ -45,7 +45,7 @@ start_sidekiq()
cmd="${cmd} ${chpst} -P"
fi
 
${cmd} bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV -P $sidekiq_pidfile "$@"
${cmd} bundle exec sidekiq -C "${sidekiq_config}" -e $RAILS_ENV "$@"
}
 
load_ok()
Loading
Loading
---
title: Add more attributes to issues GraphQL endpoint
merge_request: 17802
author:
type: changed
---
title: Banners should only be dismissable by clicking x button
merge_request: 17642
author:
type: changed
Loading
Loading
@@ -28,18 +28,28 @@ either:
- Site-wide by modifying the settings in `gitlab.yml` and `gitlab.rb` for source
and Omnibus installations respectively.
 
NOTE: **Note:**
This only applies to pipelines run as part of GitLab CI/CD. This will not enable or disable
pipelines that are run from an [external integration](../user/project/integrations/project_services.md#services).
## Per-project user setting
 
The setting to enable or disable GitLab CI/CD can be found under your project's
**Settings > General > Permissions**. Choose one of "Disabled", "Only team members"
or "Everyone with access" and hit **Save changes** for the settings to take effect.
The setting to enable or disable GitLab CI/CD Pipelines can be found in your project in
**Settings > General > Visibility, project features, permissions**. If the project
visibility is set to:
- **Private**, only project members can access pipelines.
- **Internal** or **Public**, pipelines can be made accessible to either
project members only or everyone with access.
Press **Save changes** for the settings to take effect.
 
![Sharing & Permissions settings](../user/project/settings/img/sharing_and_permissions_settings.png)
![Sharing & Permissions settings](../user/project/settings/img/sharing_and_permissions_settings_v12_3.png)
 
## Site-wide admin setting
 
You can disable GitLab CI/CD site-wide, by modifying the settings in `gitlab.yml`
and `gitlab.rb` for source and Omnibus installations respectively.
for source installations, and `gitlab.rb` for Omnibus installations.
 
Two things to note:
 
Loading
Loading
Loading
Loading
@@ -202,8 +202,36 @@ so we need to set some guidelines for their use going forward:
order is required, otherwise `let` will suffice. Remember that `let` is lazy and won't
be evaluated until it is referenced.
 
### `let_it_be` variables
In some cases there is no need to recreate the same object for tests
again for each example. For example, a project is needed to test issues
on the same project, one project will do for the entire file. This can
be achieved by using
[`let_it_be`](https://test-prof.evilmartians.io/#/let_it_be) variables
from the [`test-prof` gem](https://rubygems.org/gems/test-prof).
Note that if you modify an object defined inside a `let_it_be` block,
then you will need to reload the object as needed, or specify the `reload`
option to reload for every example.
```
let_it_be(:project, reload: true) { create(:project) }
```
You can also specify the `refind` option as well to completely load a
new object.
```
let_it_be(:project, refind: true) { create(:project) }
```
### `set` variables
 
NOTE: **Note:**
We are incrementally removing `set` in favour of `let_it_be`. See the
[removal issue](https://gitlab.com/gitlab-org/gitlab/issues/27922).
In some cases there is no need to recreate the same object for tests again for
each example. For example, a project is needed to test issues on the same
project, one project will do for the entire file. This can be achieved by using
Loading
Loading
Loading
Loading
@@ -36,11 +36,19 @@ changes to be reviewed.
## Only allow merge requests to be merged if the pipeline succeeds
 
You can prevent merge requests from being merged if their pipeline did not succeed
or if there are threads to be resolved.
or if there are threads to be resolved. This works for both:
 
Navigate to your project's settings page and expand the **Merge requests** section.
In the **Merge checks** subsection, select the **Pipelines must succeed** check
box and hit **Save** for the changes to take effect.
- GitLab CI/CD pipelines
- Pipelines run from an [external CI integration](../integrations/project_services.md#services)
As a result, [disabling GitLab CI/CD pipelines](../../../ci/enable_or_disable_ci.md)
will not disable this feature, as it will still be possible to use pipelines from external
CI providers with this feature. To enable it, you must:
1. Navigate to your project's **Settings > General** page.
1. Expand the **Merge requests** section.
1. In the **Merge checks** subsection, select the **Pipelines must succeed** checkbox.
1. Press **Save** for the changes to take effect.
 
NOTE: **Note:** This setting also prevents merge requests from being merged if there is no pipeline.
 
Loading
Loading
doc/user/project/settings/img/sharing_and_permissions_settings.png

45.2 KiB

doc/user/project/settings/img/sharing_and_permissions_settings_v12_3.png

468 KiB

Loading
Loading
@@ -24,7 +24,7 @@ The project description also partially supports [standard markdown](../../markdo
 
Set up your project's access, [visibility](../../../public_access/public_access.md), and enable [Container Registry](../../packages/container_registry/index.md) for your projects:
 
![projects sharing permissions](img/sharing_and_permissions_settings.png)
![projects sharing permissions](img/sharing_and_permissions_settings_v12_3.png)
 
If Issues are disabled, or you can't access Issues because you're not a project member, then Labels and Milestones
links will be missing from the sidebar UI.
Loading
Loading
Loading
Loading
@@ -469,7 +469,7 @@ describe Admin::ClustersController do
end
 
describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :instance) }
 
it { expect { put_update }.to be_allowed_for(:admin) }
it { expect { put_update }.to be_denied_for(:user) }
Loading
Loading
@@ -531,7 +531,7 @@ describe Admin::ClustersController do
end
 
describe 'security' do
set(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, :instance) }
let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :production_environment, :instance) }
 
it { expect { delete_destroy }.to be_allowed_for(:admin) }
it { expect { delete_destroy }.to be_denied_for(:user) }
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@
require 'spec_helper'
 
describe Admin::RequestsProfilesController do
set(:admin) { create(:admin) }
let_it_be(:admin) { create(:admin) }
 
before do
sign_in(admin)
Loading
Loading
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