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

Add latest changes from gitlab-org/gitlab@master

parent d8791851
No related branches found
No related tags found
No related merge requests found
Showing
with 215 additions and 53 deletions
Loading
Loading
@@ -25,7 +25,7 @@ GitLab provides an easy way to connect Sentry to your project:
Make sure to give the token at least the following scopes: `event:read` and `project:read`.
1. Navigate to your project’s **Settings > Operations**.
1. Ensure that the **Active** checkbox is set.
1. In the **Sentry API URL** field, enter your Sentry hostname. For example, `https://sentry.example.com`.
1. In the **Sentry API URL** field, enter your Sentry hostname. For example, enter `https://sentry.example.com` if this is the address at which your Sentry instance is available. For the SaaS version of Sentry, the hostname will be `https://sentry.io`.
1. In the **Auth Token** field, enter the token you previously generated.
1. Click the **Connect** button to test the connection to Sentry and populate the **Project** dropdown.
1. From the **Project** dropdown, choose a Sentry project to link to your GitLab project.
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@ module Gitlab
lfs_token_check(login, password, project) ||
oauth_access_token_check(login, password) ||
personal_access_token_check(password) ||
deploy_token_check(login, password) ||
deploy_token_check(login, password, project) ||
user_with_password_for_git(login, password) ||
Gitlab::Auth::Result.new
 
Loading
Loading
@@ -208,7 +208,7 @@ module Gitlab
end.uniq
end
 
def deploy_token_check(login, password)
def deploy_token_check(login, password, project)
return unless password.present?
 
token = DeployToken.active.find_by_token(password)
Loading
Loading
@@ -219,7 +219,7 @@ module Gitlab
scopes = abilities_for_scopes(token.scopes)
 
if valid_scoped_token?(token, all_available_scopes)
Gitlab::Auth::Result.new(token, token.project, :deploy_token, scopes)
Gitlab::Auth::Result.new(token, project, :deploy_token, scopes)
end
end
 
Loading
Loading
Loading
Loading
@@ -11,6 +11,7 @@ module Gitlab
cert: certificate.cert,
key: certificate.key,
data: message.encoded)
signed_email = Mail.new(signed_message)
 
overwrite_body(message, signed_email)
Loading
Loading
# frozen_string_literal: true
module Gitlab
module TabWidth
extend self
MIN = 1
MAX = 12
DEFAULT = 8
def css_class_for_user(user)
return css_class_for_value(DEFAULT) unless user
css_class_for_value(user.tab_width)
end
private
def css_class_for_value(value)
raise ArgumentError unless in_range?(value)
"tab-width-#{value}"
end
def in_range?(value)
(MIN..MAX).cover?(value)
end
end
end
Loading
Loading
@@ -484,7 +484,7 @@ msgstr ""
msgid "%{username}'s avatar"
msgstr ""
 
msgid "%{value} ms"
msgid "%{value} s"
msgstr ""
 
msgid "%{verb} %{time_spent_value} spent time."
Loading
Loading
@@ -1670,6 +1670,9 @@ msgstr ""
msgid "An error occurred fetching the dropdown data."
msgstr ""
 
msgid "An error occurred loading code navigation"
msgstr ""
msgid "An error occurred previewing the blob"
msgstr ""
 
Loading
Loading
@@ -9297,6 +9300,9 @@ msgstr ""
msgid "Go to commits"
msgstr ""
 
msgid "Go to definition"
msgstr ""
msgid "Go to environments"
msgstr ""
 
Loading
Loading
@@ -13963,6 +13969,9 @@ msgstr ""
msgid "Preferences|Layout width"
msgstr ""
 
msgid "Preferences|Must be a number between %{min} and %{max}"
msgstr ""
msgid "Preferences|Navigation theme"
msgstr ""
 
Loading
Loading
@@ -13981,6 +13990,9 @@ msgstr ""
msgid "Preferences|Syntax highlighting theme"
msgstr ""
 
msgid "Preferences|Tab width"
msgstr ""
msgid "Preferences|These settings will update how dates and times are displayed for you."
msgstr ""
 
Loading
Loading
@@ -19227,6 +19239,9 @@ msgstr ""
msgid "This GitLab instance is licensed at the %{insufficient_license} tier. Geo is only available for users who have at least a Premium license."
msgstr ""
 
msgid "This Project is currently archived and read-only. Please unarchive the project first if you want to resume Pull mirroring"
msgstr ""
msgid "This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention."
msgstr ""
 
Loading
Loading
Loading
Loading
@@ -4,6 +4,7 @@ module QA
context 'Verify', :docker do
describe 'Pipeline creation and processing' do
let(:executor) { "qa-runner-#{Time.now.to_i}" }
let(:max_wait) { 30 }
 
let(:project) do
Resource::Project.fabricate_via_api! do |project|
Loading
Loading
@@ -68,11 +69,11 @@ module QA
Page::Project::Pipeline::Index.perform(&:click_on_latest_pipeline)
 
Page::Project::Pipeline::Show.perform do |pipeline|
expect(pipeline).to be_running(wait: 30)
expect(pipeline).to have_build('test-success', status: :success)
expect(pipeline).to have_build('test-failure', status: :failed)
expect(pipeline).to have_build('test-tags', status: :pending)
expect(pipeline).to have_build('test-artifacts', status: :success)
expect(pipeline).to be_running(wait: max_wait)
expect(pipeline).to have_build('test-success', status: :success, wait: max_wait)
expect(pipeline).to have_build('test-failure', status: :failed, wait: max_wait)
expect(pipeline).to have_build('test-tags', status: :pending, wait: max_wait)
expect(pipeline).to have_build('test-artifacts', status: :success, wait: max_wait)
end
end
end
Loading
Loading
Loading
Loading
@@ -47,6 +47,7 @@ describe Profiles::PreferencesController do
theme_id: '2',
first_day_of_week: '1',
preferred_language: 'jp',
tab_width: '5',
render_whitespace_in_code: 'true'
}.with_indifferent_access
 
Loading
Loading
Loading
Loading
@@ -9,6 +9,7 @@ FactoryBot.define do
read_registry { true }
revoked { false }
expires_at { 5.days.from_now }
deploy_token_type { DeployToken.deploy_token_types[:project_type] }
 
trait :revoked do
revoked { true }
Loading
Loading
@@ -21,5 +22,13 @@ FactoryBot.define do
trait :expired do
expires_at { Date.today - 1.month }
end
trait :group do
deploy_token_type { DeployToken.deploy_token_types[:group_type] }
end
trait :project do
deploy_token_type { DeployToken.deploy_token_types[:project_type] }
end
end
end
# frozen_string_literal: true
FactoryBot.define do
factory :group_deploy_token do
group
deploy_token
end
end
Loading
Loading
@@ -23,6 +23,10 @@ FactoryBot.define do
after(:build) { |user, _| user.block! }
end
 
trait :bot do
bot_type { User.bot_types[:alert_bot] }
end
trait :external do
external { true }
end
Loading
Loading
Loading
Loading
@@ -3,53 +3,53 @@
require 'spec_helper'
 
describe 'Group navbar' do
it_behaves_like 'verified navigation bar' do
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:user) { create(:user) }
let(:group) { create(:group) }
let(:analytics_nav_item) do
{
nav_item: _('Analytics'),
nav_sub_items: [
_('Contribution Analytics')
]
}
end
 
let(:analytics_nav_item) do
let(:structure) do
[
{
nav_item: _('Group overview'),
nav_sub_items: [
_('Details'),
_('Activity')
]
},
{
nav_item: _('Analytics'),
nav_item: _('Issues'),
nav_sub_items: [
_('Contribution Analytics')
_('List'),
_('Board'),
_('Labels'),
_('Milestones')
]
},
{
nav_item: _('Merge Requests'),
nav_sub_items: []
},
{
nav_item: _('Kubernetes'),
nav_sub_items: []
},
(analytics_nav_item if Gitlab.ee?),
{
nav_item: _('Members'),
nav_sub_items: []
}
end
let(:structure) do
[
{
nav_item: _('Group overview'),
nav_sub_items: [
_('Details'),
_('Activity')
]
},
{
nav_item: _('Issues'),
nav_sub_items: [
_('List'),
_('Board'),
_('Labels'),
_('Milestones')
]
},
{
nav_item: _('Merge Requests'),
nav_sub_items: []
},
{
nav_item: _('Kubernetes'),
nav_sub_items: []
},
(analytics_nav_item if Gitlab.ee?),
{
nav_item: _('Members'),
nav_sub_items: []
}
]
end
]
end
 
it_behaves_like 'verified navigation bar' do
before do
group.add_maintainer(user)
sign_in(user)
Loading
Loading
@@ -57,4 +57,21 @@ describe 'Group navbar' do
visit group_path(group)
end
end
if Gitlab.ee?
context 'when productivity analytics is available' do
before do
stub_licensed_features(productivity_analytics: true)
analytics_nav_item[:nav_sub_items] << _('Productivity Analytics')
group.add_maintainer(user)
sign_in(user)
visit group_path(group)
end
it_behaves_like 'verified navigation bar'
end
end
end
Loading
Loading
@@ -20,7 +20,7 @@ describe 'a maintainer edits files on a source-branch of an MR from a fork', :js
end
 
before do
stub_feature_flags(web_ide_default: false, single_mr_diff_view: false)
stub_feature_flags(web_ide_default: false, single_mr_diff_view: false, code_navigation: false)
 
target_project.add_maintainer(user)
sign_in(user)
Loading
Loading
Loading
Loading
@@ -29,4 +29,31 @@ describe 'User edit preferences profile' do
 
expect(field).not_to be_checked
end
describe 'User changes tab width to acceptable value' do
it 'shows success message' do
fill_in 'Tab width', with: 9
click_button 'Save changes'
expect(page).to have_content('Preferences saved.')
end
it 'saves the value' do
tab_width_field = page.find_field('Tab width')
expect do
tab_width_field.fill_in with: 6
click_button 'Save changes'
end.to change { tab_width_field.value }
end
end
describe 'User changes tab width to unacceptable value' do
it 'shows error message' do
fill_in 'Tab width', with: -1
click_button 'Save changes'
expect(page).to have_content('Failed to save preferences')
end
end
end
Loading
Loading
@@ -13,6 +13,10 @@ describe 'File blob', :js do
wait_for_requests
end
 
before do
stub_feature_flags(code_navigation: false)
end
context 'Ruby file' do
before do
visit_blob('files/ruby/popen.rb')
Loading
Loading
Loading
Loading
@@ -69,6 +69,8 @@ describe 'Editing file blob', :js do
 
context 'from blob file path' do
before do
stub_feature_flags(code_navigation: false)
visit project_blob_path(project, tree_join(branch, file_path))
end
 
Loading
Loading
Loading
Loading
@@ -8,6 +8,7 @@ describe 'User creates blob in new project', :js do
 
shared_examples 'creating a file' do
before do
stub_feature_flags(code_navigation: false)
sign_in(user)
visit project_path(project)
end
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ describe 'Projects > Files > User creates files', :js do
let(:user) { create(:user) }
 
before do
stub_feature_flags(web_ide_default: false)
stub_feature_flags(web_ide_default: false, code_navigation: false)
 
project.add_maintainer(user)
sign_in(user)
Loading
Loading
Loading
Loading
@@ -14,6 +14,8 @@ describe 'Projects > Files > User deletes files', :js do
let(:user) { create(:user) }
 
before do
stub_feature_flags(code_navigation: false)
sign_in(user)
end
 
Loading
Loading
Loading
Loading
@@ -16,6 +16,8 @@ describe 'Projects > Files > User replaces files', :js do
let(:user) { create(:user) }
 
before do
stub_feature_flags(code_navigation: false)
sign_in(user)
end
 
Loading
Loading
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Code navigation popover component renders popover 1`] = `
<div
class="popover code-navigation-popover popover-font-size-normal gl-popover bs-popover-bottom show"
style="left: 0px; top: 0px;"
>
<div
class="arrow"
style="left: 0px;"
/>
<div
class="border-bottom"
>
<pre
class="border-0 bg-transparent m-0 code highlight"
>
console.log
</pre>
</div>
<div
class="popover-body"
>
<gl-button-stub
class="w-100"
href="http://test.com"
size="md"
target="_blank"
variant="default"
>
Go to definition
</gl-button-stub>
</div>
</div>
`;
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