Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-06-29 03:09:01 +00:00
parent 5631ece67f
commit ecdd6ffa09
16 changed files with 77 additions and 11 deletions

View file

@ -47,6 +47,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
push_frontend_feature_flag(:tribute_autocomplete, @project)
push_frontend_feature_flag(:vue_issuables_list, project)
end
before_action only: :show do
@ -55,6 +56,10 @@ class Projects::IssuesController < Projects::ApplicationController
push_frontend_feature_flag(:confidential_apollo_sidebar, @project)
end
before_action only: :index do
push_frontend_feature_flag(:scoped_labels, @project)
end
around_action :allow_gitaly_ref_name_caching, only: [:discussions]
respond_to :html

View file

@ -1,9 +1,14 @@
- empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues')
- if Feature.enabled?(:vue_issuables_list, @project)
.js-issuables-list{ data: { endpoint: expose_url(api_v4_projects_issues_path(id: @project.id)),
'can-bulk-edit': @can_bulk_update.to_json,
'empty-svg-path': image_path('illustrations/issues.svg'),
'sort-key': @sort } }
- else
- empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues')
%ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') }
= render partial: "projects/issues/issue", collection: @issues
- if @issues.blank?
= render empty_state_path
%ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') }
= render partial: "projects/issues/issue", collection: @issues
- if @issues.blank?
= render empty_state_path
- if @issues.present?
= paginate @issues, theme: "gitlab", total_pages: @total_pages
- if @issues.present?
= paginate @issues, theme: "gitlab", total_pages: @total_pages

View file

@ -3628,7 +3628,7 @@ only:
The Docker image to use for the `release-cli` must be specified, using the following directive:
```yaml
image: registry.gitlab.com/gitlab-org/release-cli:stable
image: registry.gitlab.com/gitlab-org/release-cli:latest
```
#### Script
@ -3724,7 +3724,7 @@ stages:
release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:stable
image: registry.gitlab.com/gitlab-org/release-cli:latest
only:
- tags
script:

View file

@ -7,6 +7,8 @@ RSpec.describe 'Group empty states' do
let(:user) { create(:group_member, :developer, user: create(:user), group: group ).user }
before do
stub_feature_flags(vue_issuables_list: false)
sign_in(user)
end

View file

@ -2,13 +2,15 @@
require 'spec_helper'
RSpec.describe 'issuable list' do
RSpec.describe 'issuable list', :js do
let(:project) { create(:project) }
let(:user) { create(:user) }
issuable_types = [:issue, :merge_request]
before do
stub_feature_flags(vue_issuables_list: false)
# something is going on
project.add_user(user, :developer)
sign_in(user)
issuable_types.each { |type| create_issuables(type) }

View file

@ -10,6 +10,10 @@ RSpec.describe 'Sort Issuable List' do
let(:first_updated_issuable) { issuables.order_updated_asc.first }
let(:last_updated_issuable) { issuables.order_updated_desc.first }
before do
stub_feature_flags(vue_issuables_list: false)
end
context 'for merge requests' do
include MergeRequestHelpers

View file

@ -13,6 +13,9 @@ RSpec.describe 'Issues > Labels bulk assignment' do
context 'as an allowed user', :js do
before do
# Make sure that issuables list FF is not turned on.
stub_feature_flags(vue_issuables_list: false)
project.add_maintainer(user)
sign_in user

View file

@ -26,6 +26,8 @@ RSpec.describe 'Filter issues', :js do
end
before do
stub_feature_flags(vue_issuables_list: false)
project.add_maintainer(user)
create(:issue, project: project, author: user2, title: "Bug report 1")

View file

@ -8,6 +8,7 @@ RSpec.describe 'Multiple issue updating from issues#index', :js do
let!(:user) { create(:user)}
before do
stub_feature_flags(vue_issuables_list: false)
project.add_maintainer(user)
sign_in(user)
end

View file

@ -7,6 +7,8 @@ RSpec.describe 'User filters issues' do
let_it_be(:project) { create(:project_empty_repo, :public) }
before do
stub_feature_flags(vue_issuables_list: false)
%w[foobar barbaz].each do |title|
create(:issue,
author: user,

View file

@ -7,6 +7,8 @@ RSpec.describe 'New issue breadcrumb' do
let(:user) { project.creator }
before do
stub_feature_flags(vue_issuables_list: false)
sign_in(user)
visit(new_project_issue_path(project))
end

View file

@ -6,6 +6,10 @@ RSpec.describe 'Issues > User sees empty state' do
let_it_be(:project) { create(:project, :public) }
let_it_be(:user) { project.creator }
before do
stub_feature_flags(vue_issuables_list: false)
end
shared_examples_for 'empty state with filters' do
it 'user sees empty state with filters' do
create(:issue, author: user, project: project)

View file

@ -16,6 +16,8 @@ RSpec.describe "User sorts issues" do
let_it_be(:later_due_milestone) { create(:milestone, project: project, due_date: '2013-12-12') }
before do
stub_feature_flags(vue_issuables_list: false)
create_list(:award_emoji, 2, :upvote, awardable: issue1)
create_list(:award_emoji, 2, :downvote, awardable: issue2)
create(:award_emoji, :downvote, awardable: issue1)

View file

@ -9,6 +9,10 @@ RSpec.describe "User views issues" do
let_it_be(:user) { create(:user) }
before do
stub_feature_flags(vue_issuables_list: false)
end
shared_examples "opens issue from list" do
it "opens issue" do
click_link(issue.title)
@ -116,4 +120,24 @@ RSpec.describe "User views issues" do
context "when not signed in" do
include_examples "public project"
end
context 'when vue_issuables_list feature is enabled', :js do
before do
stub_feature_flags(vue_issuables_list: true)
end
context 'when signed in' do
before do
project.add_developer(user)
sign_in(user)
end
include_examples "public project"
include_examples "internal project"
end
context 'when not signed in' do
include_examples "public project"
end
end
end

View file

@ -13,6 +13,10 @@ RSpec.describe 'Issue prioritization' do
let(:label_4) { create(:label, title: 'label_4', project: project, priority: 4) }
let(:label_5) { create(:label, title: 'label_5', project: project) } # no priority
before do
stub_feature_flags(vue_issuables_list: false)
end
# According to https://gitlab.com/gitlab-org/gitlab-foss/issues/14189#note_4360653
context 'when issues have one label' do
it 'Are sorted properly' do

View file

@ -6,6 +6,10 @@ RSpec.describe 'Projects > User sees sidebar' do
let(:user) { create(:user) }
let(:project) { create(:project, :private, public_builds: false, namespace: user.namespace) }
before do
stub_feature_flags(vue_issuables_list: false)
end
# NOTE: See documented behaviour https://design.gitlab.com/regions/navigation#contextual-navigation
context 'on different viewports', :js do
include MobileHelpers