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

Add latest changes from gitlab-org/gitlab@master

parent f4d27d53
No related branches found
No related tags found
No related merge requests found
Showing
with 58 additions and 49 deletions
Loading
Loading
@@ -121,7 +121,7 @@ export default {
:title="title"
>
<slot>
<icon name="duplicate" />
<icon name="copy-to-clipboard" />
</slot>
</gl-button>
</template>
Loading
Loading
@@ -5,5 +5,5 @@
*/
 
if (gon && gon.webpack_public_path) {
__webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line camelcase
__webpack_public_path__ = gon.webpack_public_path; // eslint-disable-line babel/camelcase
}
/* eslint-disable consistent-return, camelcase, class-methods-use-this */
/* eslint-disable consistent-return, class-methods-use-this */
 
// Zen Mode (full screen) textarea
//
Loading
Loading
@@ -91,8 +91,8 @@ export default class ZenMode {
}
}
 
scrollTo(zen_area) {
return $.scrollTo(zen_area, 0, {
scrollTo(zenArea) {
return $.scrollTo(zenArea, 0, {
offset: -150,
});
}
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ module ButtonHelper
}
 
content_tag :button, button_attributes do
concat(sprite_icon('duplicate')) unless hide_button_icon
concat(sprite_icon('copy-to-clipboard')) unless hide_button_icon
concat(button_text)
end
end
Loading
Loading
# frozen_string_literal: true
module DeleteWithLimit
extend ActiveSupport::Concern
class_methods do
def delete_with_limit(maximum)
limit(maximum).delete_all
end
end
end
Loading
Loading
@@ -4,6 +4,8 @@ class Event < ApplicationRecord
include Sortable
include FromUnion
include Presentable
include DeleteWithLimit
include CreatedAtFilterable
 
default_scope { reorder(nil) }
 
Loading
Loading
Loading
Loading
@@ -3,6 +3,8 @@
class WebHookLog < ApplicationRecord
include SafeUrl
include Presentable
include DeleteWithLimit
include CreatedAtFilterable
 
belongs_to :web_hook
 
Loading
Loading
Loading
Loading
@@ -25,10 +25,9 @@ class EmailsOnPushService < Service
end
 
def initialize_properties
if properties.nil?
self.properties = {}
self.branches_to_be_notified ||= "all"
end
super
self.branches_to_be_notified = 'all' if branches_to_be_notified.nil?
end
 
def execute(push_data)
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@
.card-header
.float-right
%button.js-clipboard-trigger.btn.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button }
= sprite_icon('duplicate')
= sprite_icon('copy-to-clipboard')
%pre.hidden
= @query.formatted_query
%strong
Loading
Loading
@@ -42,7 +42,7 @@
.card-header
.float-right
%button.js-clipboard-trigger.btn.btn-sm{ title: t('sherlock.copy_to_clipboard'), type: :button }
= sprite_icon('duplicate')
= sprite_icon('copy-to-clipboard')
%pre.hidden
= @query.explain
%strong
Loading
Loading
Loading
Loading
@@ -6,18 +6,12 @@ class PruneOldEventsWorker
 
feature_category_not_owned!
 
# rubocop: disable CodeReuse/ActiveRecord
DELETE_LIMIT = 10_000
def perform
# Contribution calendar shows maximum 12 months of events, we retain 3 years for data integrity.
# Double nested query is used because MySQL doesn't allow DELETE subqueries on the same table.
Event.unscoped.where(
'(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where(
'created_at < ?',
(3.years + 1.day).ago)
.select(:id)
.limit(10_000))
.delete_all
cutoff_date = (3.years + 1.day).ago
Event.unscoped.created_before(cutoff_date).delete_with_limit(DELETE_LIMIT)
end
# rubocop: enable CodeReuse/ActiveRecord
end
Loading
Loading
@@ -11,20 +11,9 @@ class PruneWebHookLogsWorker
# The maximum number of rows to remove in a single job.
DELETE_LIMIT = 50_000
 
# rubocop: disable CodeReuse/ActiveRecord
def perform
# MySQL doesn't allow "DELETE FROM ... WHERE id IN ( ... )" if the inner
# query refers to the same table. To work around this we wrap the IN body in
# another sub query.
WebHookLog
.where(
'id IN (SELECT id FROM (?) ids_to_remove)',
WebHookLog
.select(:id)
.where('created_at < ?', 90.days.ago.beginning_of_day)
.limit(DELETE_LIMIT)
)
.delete_all
cutoff_date = 90.days.ago.beginning_of_day
WebHookLog.created_before(cutoff_date).delete_with_limit(DELETE_LIMIT)
end
# rubocop: enable CodeReuse/ActiveRecord
end
---
title: Fix emails on push integrations created before 12.7
merge_request: 23699
author:
type: fixed
---
title: Change vague copy to clipboard icon to a clearer icon.
merge_request: 23983
author:
type: changed
Loading
Loading
@@ -6,6 +6,8 @@ GraphQL::Field.accepts_definitions(authorize: GraphQL::Define.assign_metadata_ke
GraphQL::Schema::Object.accepts_definition(:authorize)
GraphQL::Schema::Field.accepts_definition(:authorize)
 
GitlabSchema.middleware << GraphQL::Schema::TimeoutMiddleware.new(max_seconds: ENV.fetch('GITLAB_RAILS_GRAPHQL_TIMEOUT', 30).to_i) do |timeout_error, query|
Gitlab::GraphqlLogger.error(message: timeout_error.to_s, query: query.query_string, query_variables: query.provided_variables)
Gitlab::Application.config.after_initialize do
GitlabSchema.middleware << GraphQL::Schema::TimeoutMiddleware.new(max_seconds: ENV.fetch('GITLAB_RAILS_GRAPHQL_TIMEOUT', 30).to_i) do |timeout_error, query|
Gitlab::GraphqlLogger.error(message: timeout_error.to_s, query: query.query_string, query_variables: query.provided_variables)
end
end
Loading
Loading
@@ -146,7 +146,7 @@
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.5.0",
"@gitlab/eslint-config": "^2.0.0",
"@gitlab/eslint-config": "^2.1.1",
"@gitlab/eslint-plugin-i18n": "^1.1.0",
"@gitlab/eslint-plugin-vue-i18n": "^1.2.0",
"@vue/test-utils": "^1.0.0-beta.30",
Loading
Loading
Loading
Loading
@@ -61,7 +61,7 @@ describe 'Projects > Settings > For a forked project', :js do
 
within('div#project-dropdown') do
click_button('Select project')
click_button('Sentry | Internal')
click_button('Sentry | internal')
end
 
click_button('Save changes')
Loading
Loading
Loading
Loading
@@ -26,11 +26,11 @@ describe 'Project > Settings > CI/CD > Container registry tag expiration policy'
it 'saves expiration policy submit the form' do
within '#js-registry-policies' do
within '.card-body' do
find('#expiration-policy-toggle button:not(.is-disabled)').click
select('7 days until tags are automatically removed', from: 'expiration-policy-interval')
select('Every day', from: 'expiration-policy-schedule')
select('50 tags per image name', from: 'expiration-policy-latest')
fill_in('expiration-policy-name-matching', with: '*-production')
find('.gl-toggle-wrapper button:not(.is-disabled)').click
select('7 days until tags are automatically removed', from: 'Expiration interval:')
select('Every day', from: 'Expiration schedule:')
select('50 tags per image name', from: 'Number of tags to retain:')
fill_in('Docker tags with names matching this regex pattern will expire:', with: '*-production')
end
submit_button = find('.card-footer .btn.btn-success')
expect(submit_button).not_to be_disabled
Loading
Loading
Loading
Loading
@@ -47,7 +47,7 @@ describe('Error Tracking Settings - Getters', () => {
it('should display correctly when a project is selected', () => {
[state.selectedProject] = projectList;
 
expect(getters.dropdownLabel(state, mockGetters)).toEqual('organizationName | name');
expect(getters.dropdownLabel(state, mockGetters)).toEqual('organizationName | slug');
});
 
it('should display correctly when no project is selected', () => {
Loading
Loading
import Vuex from 'vuex';
import { createLocalVue, shallowMount } from '@vue/test-utils';
import IdeStatusList from '~/ide/components/ide_status_list';
import IdeStatusList from '~/ide/components/ide_status_list.vue';
 
const TEST_FILE = {
name: 'lorem.md',
Loading
Loading
import { shallowMount } from '@vue/test-utils';
import MRPopover from '~/mr_popover/components/mr_popover';
import MRPopover from '~/mr_popover/components/mr_popover.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue';
 
describe('MR Popover', () => {
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