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

Add latest changes from gitlab-org/gitlab@master

parent c158fa8d
No related branches found
No related tags found
No related merge requests found
Showing
with 85 additions and 43 deletions
Loading
Loading
@@ -36,6 +36,8 @@ class GroupMembersFinder < UnionFinder
relations << descendant_members
end
 
return GroupMember.none if relations.empty?
members = find_union(relations, GroupMember)
filter_members(members, params)
end
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@
class Epic < ApplicationRecord
include IgnorableColumns
 
ignore_column :milestone_id, remove_after: '2019-12-15', remove_with: '12.7'
ignore_column :milestone_id, remove_after: '2020-02-01', remove_with: '12.8'
 
def self.link_reference_pattern
nil
Loading
Loading
Loading
Loading
@@ -1325,7 +1325,7 @@ class Project < ApplicationRecord
end
 
def has_active_hooks?(hooks_scope = :push_hooks)
hooks.hooks_for(hooks_scope).any? || SystemHook.hooks_for(hooks_scope).any? || Gitlab::Plugin.any?
hooks.hooks_for(hooks_scope).any? || SystemHook.hooks_for(hooks_scope).any? || Gitlab::FileHook.any?
end
 
def has_active_services?(hooks_scope = :push_hooks)
Loading
Loading
Loading
Loading
@@ -14,8 +14,12 @@ class Snippet < ApplicationRecord
include Editable
include Gitlab::SQL::Pattern
include FromUnion
include IgnorableColumns
extend ::Gitlab::Utils::Override
 
ignore_column :storage_version, remove_with: '12.9', remove_after: '2020-03-22'
cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description
cache_markdown_field :content
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ class SystemHooksService
hook.async_execute(data, 'system_hooks')
end
 
Gitlab::Plugin.execute_all_async(data)
Gitlab::FileHook.execute_all_async(data)
end
 
private
Loading
Loading
Loading
Loading
@@ -11,4 +11,4 @@
 
= render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class
 
= render 'shared/plugins/index'
= render 'shared/file_hooks/index'
- plugins = Gitlab::Plugin.files
- file_hooks = Gitlab::FileHook.files
 
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
Plugins
= _('File Hooks')
%p
#{link_to 'Plugins', help_page_path('administration/plugins')} are similar to
system hooks but are executed as files instead of sending data to a URL.
= _('File hooks are similar to system hooks but are executed as files instead of sending data to a URL.')
= link_to _('For more information, see the File Hooks documentation.'), help_page_path('administration/file_hooks')
 
.col-lg-8.append-bottom-default
- if plugins.any?
- if file_hooks.any?
.card
.card-header
Plugins (#{plugins.count})
= _('File Hooks (%{count})') % { count: file_hooks.count }
%ul.content-list
- plugins.each do |file|
- file_hooks.each do |file|
%li
.monospace
= File.basename(file)
- else
.card.bg-light.text-center
.nothing-here-block No plugins found.
.nothing-here-block= _('No file hooks found.')
Loading
Loading
@@ -158,7 +158,7 @@
- pages
- pages_domain_verification
- pages_domain_ssl_renewal
- plugin
- file_hook
- post_receive
- process_commit
- project_cache
Loading
Loading
# frozen_string_literal: true
 
class PluginWorker
class FileHookWorker
include ApplicationWorker
 
sidekiq_options retry: false
feature_category :integrations
 
def perform(file_name, data)
success, message = Gitlab::Plugin.execute(file_name, data)
success, message = Gitlab::FileHook.execute(file_name, data)
 
unless success
Gitlab::PluginLogger.error("Plugin Error => #{file_name}: #{message}")
Gitlab::FileHookLogger.error("File Hook Error => #{file_name}: #{message}")
end
 
true
Loading
Loading
---
title: 'Resolve Design View: Left/Right keyboard arrows through Designs'
merge_request: 22870
author:
type: added
---
title: Add returning relation from GroupMembersFinder if called on root group with
only inherited param
merge_request: 23161
author:
type: fixed
---
title: Allow Unicode 11 emojis in project names
merge_request: 22776
author: Harm Berntsen
type: changed
---
title: Added Conan installation instructions to Conan package details page
merge_request: 22390
author:
type: added
---
title: Rename GitLab Plugins feature to GitLab File Hooks
merge_request: 22979
author:
type: changed
---
title: Remove storage_version column from snippets
merge_request: 23004
author:
type: changed
---
title: Remove milestone_id from epics
merge_request: 20539
author: Lee Tickett
type: other
Loading
Loading
@@ -76,7 +76,7 @@
- [pages_domain_ssl_renewal, 1]
- [object_storage_upload, 1]
- [object_storage, 1]
- [plugin, 1]
- [file_hook, 1]
- [pipeline_background, 1]
- [repository_update_remote_mirror, 1]
- [repository_remove_remote, 1]
Loading
Loading
# frozen_string_literal: true
class RemoveMilestoneIdFromEpics < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
remove_column :epics, :milestone_id
end
def down
add_column :epics, :milestone_id, :integer
end
end
# frozen_string_literal: true
class RemoveStorageVersionColumnFromSnippets < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
return unless column_exists?(:snippets, :storage_version)
remove_column :snippets, :storage_version
end
def down
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
:snippets,
:storage_version,
:integer,
default: 2,
allow_null: false
)
end
end
Loading
Loading
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 2020_01_14_180546) do
ActiveRecord::Schema.define(version: 2020_01_14_113341) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -1538,7 +1538,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
end
 
create_table "epics", id: :serial, force: :cascade do |t|
t.integer "milestone_id"
t.integer "group_id", null: false
t.integer "author_id", null: false
t.integer "assignee_id"
Loading
Loading
@@ -1577,7 +1576,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
t.index ["end_date"], name: "index_epics_on_end_date"
t.index ["group_id"], name: "index_epics_on_group_id"
t.index ["iid"], name: "index_epics_on_iid"
t.index ["milestone_id"], name: "index_milestone"
t.index ["parent_id"], name: "index_epics_on_parent_id"
t.index ["start_date"], name: "index_epics_on_start_date"
t.index ["start_date_sourcing_epic_id"], name: "index_epics_on_start_date_sourcing_epic_id", where: "(start_date_sourcing_epic_id IS NOT NULL)"
Loading
Loading
@@ -3838,6 +3836,7 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
t.string "encrypted_secret_token_iv", limit: 255
t.boolean "secret", default: false, null: false
t.string "repository_storage", limit: 255, default: "default", null: false
t.integer "storage_version", default: 2, null: false
t.index ["author_id"], name: "index_snippets_on_author_id"
t.index ["content"], name: "index_snippets_on_content_trigram", opclass: :gin_trgm_ops, using: :gin
t.index ["created_at"], name: "index_snippets_on_created_at"
Loading
Loading
@@ -4590,7 +4589,6 @@ ActiveRecord::Schema.define(version: 2020_01_14_180546) do
add_foreign_key "epics", "epics", column: "start_date_sourcing_epic_id", name: "fk_9d480c64b2", on_delete: :nullify
add_foreign_key "epics", "milestones", column: "due_date_sourcing_milestone_id", name: "fk_3c1fd1cccc", on_delete: :nullify
add_foreign_key "epics", "milestones", column: "start_date_sourcing_milestone_id", name: "fk_1fbed67632", on_delete: :nullify
add_foreign_key "epics", "milestones", on_delete: :nullify
add_foreign_key "epics", "namespaces", column: "group_id", name: "fk_f081aa4489", on_delete: :cascade
add_foreign_key "epics", "users", column: "assignee_id", name: "fk_dccd3f98fc", on_delete: :nullify
add_foreign_key "epics", "users", column: "author_id", name: "fk_3654b61b03", on_delete: :cascade
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