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

Add latest changes from gitlab-org/gitlab@master

parent 263f926c
No related branches found
No related tags found
No related merge requests found
Showing
with 80 additions and 29 deletions
Loading
Loading
@@ -301,12 +301,6 @@ RSpec/AnyInstanceOf:
Enabled: false
 
# Cops for upgrade to gitlab-styles 3.1.0
FactoryBot/FactoryClassName:
Enabled: false
FactoryBot/CreateList:
Enabled: false
Rails/SafeNavigationWithBlank:
Enabled: false
 
Loading
Loading
Loading
Loading
@@ -555,6 +555,16 @@ export const calculateRemainingMilliseconds = endDate => {
export const getDateInPast = (date, daysInPast) =>
new Date(newDate(date).setDate(date.getDate() - daysInPast));
 
/**
* Adds a given number of days to a given date and returns the new date.
*
* @param {Date} date the date that we will add days to
* @param {Number} daysInFuture number of days that are added to a given date
* @returns {Date} Date in future as Date object
*/
export const getDateInFuture = (date, daysInFuture) =>
new Date(newDate(date).setDate(date.getDate() + daysInFuture));
/*
* Appending T00:00:00 makes JS assume local time and prevents it from shifting the date
* to match the user's time zone. We want to display the date in server time for now, to
Loading
Loading
Loading
Loading
@@ -48,9 +48,6 @@
padding: 10px;
border: 0;
border-radius: 0;
font-family: $monospace-font;
font-size: $code-font-size;
line-height: $code-line-height;
margin: 0;
overflow: auto;
overflow-y: hidden;
Loading
Loading
@@ -58,6 +55,12 @@
word-wrap: normal;
border-left: $border-style;
}
code {
font-family: $monospace-font;
font-size: $code-font-size;
line-height: $code-line-height;
}
}
 
.line-numbers {
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ module Emails
add_project_headers
headers['X-GitLab-Author'] = @message.author_username
 
mail(from: sender(@message.author_id, @message.send_from_committer_email?),
mail(from: sender(@message.author_id, send_from_user_email: @message.send_from_committer_email?),
reply_to: @message.reply_to,
subject: @message.subject)
end
Loading
Loading
Loading
Loading
@@ -59,11 +59,11 @@ class Notify < BaseMailer
 
# Return an email address that displays the name of the sender.
# Only the displayed name changes; the actual email address is always the same.
def sender(sender_id, send_from_user_email = false)
def sender(sender_id, send_from_user_email: false, sender_name: nil)
return unless sender = User.find(sender_id)
 
address = default_sender_address
address.display_name = sender.name
address.display_name = sender_name.presence || sender.name
 
if send_from_user_email && can_send_from_user_email?(sender)
address.address = sender.email
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ module Ci
container_scanning: 'gl-container-scanning-report.json',
dast: 'gl-dast-report.json',
license_management: 'gl-license-management-report.json',
license_scanning: 'gl-license-management-report.json',
license_scanning: 'gl-license-scanning-report.json',
performance: 'performance.json',
metrics: 'metrics.txt'
}.freeze
Loading
Loading
Loading
Loading
@@ -18,6 +18,7 @@ module Issuable
new_entity.update(update_attributes)
 
copy_resource_label_events
copy_resource_weight_events
end
 
private
Loading
Loading
@@ -60,6 +61,20 @@ module Issuable
end
end
 
def copy_resource_weight_events
return unless original_entity.respond_to?(:resource_weight_events)
original_entity.resource_weight_events.find_in_batches do |batch|
events = batch.map do |event|
event.attributes
.except('id', 'reference', 'reference_html')
.merge('issue_id' => new_entity.id)
end
Gitlab::Database.bulk_insert(ResourceWeightEvent.table_name, events)
end
end
def entity_key
new_entity.class.name.parameterize('_').foreign_key
end
Loading
Loading
---
title: Add build metadata to package API
merge_request: 20682
author:
type: added
---
title: Add getDateInFuture util method
merge_request: 22671
author:
type: added
---
title: Align embedded snippet mono space font with GitLab mono space font.
merge_request: !20865
author:
type: changed
Loading
Loading
@@ -79,7 +79,10 @@ Example response:
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
},
"created_at": "2019-11-27T03:37:38.711Z"
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
}
},
{
"id": 2,
Loading
Loading
@@ -90,7 +93,10 @@ Example response:
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
},
"created_at": "2019-11-27T03:37:38.711Z"
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
}
}
]
```
Loading
Loading
@@ -133,7 +139,10 @@ Example response:
"web_path": "/namespace1/project1/-/packages/1",
"delete_api_path": "/namespace1/project1/-/packages/1"
},
"created_at": "2019-11-27T03:37:38.711Z"
"created_at": "2019-11-27T03:37:38.711Z",
"build_info": {
"pipeline_id": 123
}
}
```
 
Loading
Loading
Loading
Loading
@@ -62,10 +62,18 @@ module Gitlab
end
 
def error_detected!
set_error!(true)
end
def clear_errors!
set_error!(false)
end
def set_error!(status)
clear_memoization(:prometheus_metrics_enabled)
 
PROVIDER_MUTEX.synchronize do
@error = true
@error = status
end
end
 
Loading
Loading
Loading
Loading
@@ -19,11 +19,10 @@ module QA
members.add_member(@user.username)
end
 
issue = Resource::Issue.fabricate_via_api! do |issue|
Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue to test mention'
issue.project = project
end
issue.visit!
end.visit!
end
 
it 'user mentions another user in an issue' do
Loading
Loading
Loading
Loading
@@ -112,9 +112,7 @@ describe AutocompleteController do
 
context 'limited users per page' do
before do
25.times do
create(:user)
end
create_list(:user, 25)
 
sign_in(user)
get(:users)
Loading
Loading
# frozen_string_literal: true
 
FactoryBot.define do
factory :cycle_analytics_project_stage, class: Analytics::CycleAnalytics::ProjectStage do
factory :cycle_analytics_project_stage, class: 'Analytics::CycleAnalytics::ProjectStage' do
project
sequence(:name) { |n| "Stage ##{n}" }
hidden { false }
Loading
Loading
# frozen_string_literal: true
 
FactoryBot.define do
factory :aws_role, class: Aws::Role do
factory :aws_role, class: 'Aws::Role' do
user
 
role_arn { 'arn:aws:iam::123456789012:role/role-name' }
Loading
Loading
Loading
Loading
@@ -6,11 +6,11 @@ FactoryBot.define do
image_url { generate(:url) }
end
 
factory :project_badge, traits: [:base_badge], class: ProjectBadge do
factory :project_badge, traits: [:base_badge], class: 'ProjectBadge' do
project
end
 
factory :group_badge, aliases: [:badge], traits: [:base_badge], class: GroupBadge do
factory :group_badge, aliases: [:badge], traits: [:base_badge], class: 'GroupBadge' do
group
end
end
# frozen_string_literal: true
 
FactoryBot.define do
factory :chat_name, class: ChatName do
factory :chat_name, class: 'ChatName' do
user factory: :user
service factory: :service
 
Loading
Loading
# frozen_string_literal: true
 
FactoryBot.define do
factory :chat_team, class: ChatTeam do
factory :chat_team, class: 'ChatTeam' do
sequence(:team_id) { |n| "abcdefghijklm#{n}" }
namespace factory: :group
end
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