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

Add latest changes from gitlab-org/gitlab@master

parent 51a95129
No related branches found
No related tags found
No related merge requests found
Showing
with 108 additions and 55 deletions
Loading
Loading
@@ -4,7 +4,11 @@ module Resolvers
class BoardsResolver < BaseResolver
type Types::BoardType, null: true
 
def resolve(**args)
argument :id, GraphQL::ID_TYPE,
required: false,
description: 'Find a board by its ID'
def resolve(id: nil)
# The project or group could have been loaded in batch by `BatchLoader`.
# At this point we need the `id` of the project/group to query for boards, so
# make sure it's loaded and not `nil` before continuing.
Loading
Loading
@@ -12,7 +16,17 @@ module Resolvers
 
return Board.none unless parent
 
Boards::ListService.new(parent, context[:current_user]).execute(create_default_board: false)
Boards::ListService.new(parent, context[:current_user], board_id: extract_board_id(id)).execute(create_default_board: false)
rescue ActiveRecord::RecordNotFound
Board.none
end
private
def extract_board_id(gid)
return unless gid.present?
GitlabSchema.parse_gid(gid, expected_type: ::Board).model_id
end
end
end
Loading
Loading
@@ -52,6 +52,12 @@ module Types
null: true,
description: 'Boards of the group',
resolver: Resolvers::BoardsResolver
field :board,
Types::BoardType,
null: true,
description: 'A single board of the group',
resolver: Resolvers::BoardsResolver.single
end
end
 
Loading
Loading
Loading
Loading
@@ -185,6 +185,12 @@ module Types
null: true,
description: 'Boards of the project',
resolver: Resolvers::BoardsResolver
field :board,
Types::BoardType,
null: true,
description: 'A single board of the project',
resolver: Resolvers::BoardsResolver.single
end
end
 
Loading
Loading
Loading
Loading
@@ -669,6 +669,9 @@ module ProjectsHelper
project_members#index
integrations#show
services#edit
hooks#index
hooks#edit
hook_logs#show
repository#show
ci_cd#show
operations#show
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ module UserCalloutsHelper
GCP_SIGNUP_OFFER = 'gcp_signup_offer'
SUGGEST_POPOVER_DISMISSED = 'suggest_popover_dismissed'
TABS_POSITION_HIGHLIGHT = 'tabs_position_highlight'
WEBHOOKS_MOVED = 'webhooks_moved'
 
def show_gke_cluster_integration_callout?(project)
can?(current_user, :create_cluster, project) &&
Loading
Loading
@@ -33,6 +34,10 @@ module UserCalloutsHelper
current_user && !user_dismissed?(TABS_POSITION_HIGHLIGHT) && !Rails.env.test?
end
 
def show_webhooks_moved_alert?
!user_dismissed?(WEBHOOKS_MOVED)
end
private
 
def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil)
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ class ProjectHook < WebHook
validates :project, presence: true
 
def pluralized_name
_('Project Hooks')
_('Webhooks')
end
end
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,8 @@ module UserCalloutEnums
gcp_signup_offer: 2,
cluster_security_warning: 3,
suggest_popover_dismissed: 9,
tabs_position_highlight: 10
tabs_position_highlight: 10,
webhooks_moved: 13
}
end
end
Loading
Loading
Loading
Loading
@@ -2,49 +2,35 @@
 
module ResourceEvents
class ChangeMilestoneService
attr_reader :resource, :user, :event_created_at, :resource_args
attr_reader :resource, :user, :event_created_at, :milestone
 
def initialize(resource:, user:, created_at: Time.now)
@resource = resource
@user = user
@event_created_at = created_at
@resource_args = {
user_id: user.id,
created_at: event_created_at
}
@milestone = resource&.milestone
end
 
def execute
args = build_resource_args
action = if milestone.nil?
:remove
else
:add
end
ResourceMilestoneEvent.create(build_resource_args)
 
record = args.merge(milestone_id: milestone&.id, action: ResourceMilestoneEvent.actions[action])
create_event(record)
resource.expire_note_etag_cache
end
 
private
 
def milestone
resource&.milestone
end
def create_event(record)
ResourceMilestoneEvent.create(record)
resource.expire_note_etag_cache
end
def build_resource_args
key = resource.class.name.underscore.foreign_key
action = milestone.blank? ? :remove : :add
key = resource.class.name.foreign_key
 
resource_args.merge(key => resource.id, state: ResourceMilestoneEvent.states[resource.state])
{
user_id: user.id,
created_at: event_created_at,
milestone_id: milestone&.id,
state: ResourceMilestoneEvent.states[resource.state],
action: ResourceMilestoneEvent.actions[action],
key => resource.id
}
end
end
end
Loading
Loading
@@ -366,10 +366,14 @@
%span
= _('Members')
- if can_edit
= nav_link(controller: [:integrations, :services, :hooks, :hook_logs]) do
= nav_link(controller: [:integrations, :services]) do
= link_to project_settings_integrations_path(@project), title: _('Integrations'), data: { qa_selector: 'integrations_settings_link' } do
%span
= _('Integrations')
= nav_link(controller: [:hooks, :hook_logs]) do
= link_to project_hooks_path(@project), title: _('Webhooks'), data: { qa_selector: 'webhooks_settings_link' } do
%span
= _('Webhooks')
= nav_link(controller: :repository) do
= link_to project_settings_repository_path(@project), title: _('Repository') do
%span
Loading
Loading
- @content_class = 'limit-container-width' unless fluid_layout
- add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path
- page_title _('Webhook Logs')
.row.prepend-top-default.append-bottom-default
.col-lg-3
%h4.prepend-top-0
Loading
Loading
- add_to_breadcrumbs _('ProjectService|Integrations'), namespace_project_settings_integrations_path
- page_title _('Edit Project Hook')
- @content_class = 'limit-container-width' unless fluid_layout
- add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path
- page_title _('Webhook')
 
.row.prepend-top-default
.col-lg-3
Loading
Loading
- @content_class = 'limit-container-width' unless fluid_layout
- breadcrumb_title _('Webhook Settings')
- page_title _('Webhooks')
.row.prepend-top-default
.col-lg-4
= render 'shared/web_hooks/title_and_docs', hook: @hook
Loading
Loading
.row.prepend-top-default.append-bottom-default
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
= s_("ProjectService|Project services")
%p= s_("ProjectService|Project services allow you to integrate GitLab with other applications")
= _('Integrations')
%p= _('Integrations allow you to integrate GitLab with other applications')
.col-lg-8
%table.table
%colgroup
Loading
Loading
- breadcrumb_title @service.title
- add_to_breadcrumbs _('Integration Settings'), project_settings_integrations_path(@project)
- page_title @service.title, s_("ProjectService|Services")
- add_to_breadcrumbs(s_("ProjectService|Settings"), edit_project_path(@project))
- add_to_breadcrumbs(s_("ProjectService|Integrations"), project_settings_integrations_path(@project))
 
= render 'deprecated_message' if @service.deprecation_message
 
Loading
Loading
- @content_class = "limit-container-width" unless fluid_layout
- breadcrumb_title _("Integrations Settings")
- breadcrumb_title _('Integration Settings')
- page_title _('Integrations')
= render 'projects/hooks/index'
- if show_webhooks_moved_alert?
.gl-alert.gl-alert-info.js-webhooks-moved-alert.prepend-top-default{ role: 'alert', data: { feature_id: UserCalloutsHelper::WEBHOOKS_MOVED, dismiss_endpoint: user_callouts_path } }
= sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title')
%button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') }
= sprite_icon('close', size: 16, css_class: 'gl-icon')
.gl-alert-body
= _('Webhooks have moved. They can now be found under the Settings menu.')
.gl-alert-actions
= link_to _('Go to Webhooks'), project_hooks_path(@project), class: 'btn gl-alert-action btn-info new-gl-button'
= render 'projects/services/index'
Loading
Loading
@@ -4,7 +4,7 @@
 
%section.settings.no-animate.js-error-tracking-settings
.settings-header
%h4
%h3{ :class => "h4" }
= _('Error Tracking')
%button.btn.js-settings-toggle{ type: 'button' }
= _('Expand')
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@
 
%section.settings.no-animate.qa-incident-management-settings
.settings-header
%h4= _('Incidents')
%h3{ :class => "h4" }= _('Incidents')
%button.btn.js-settings-toggle{ type: 'button' }
= _('Expand')
%p
Loading
Loading
Loading
Loading
@@ -15,62 +15,62 @@
= form.check_box :push_events, class: 'form-check-input'
= form.label :push_events, class: 'list-label form-check-label ml-1' do
%strong Push events
%p.light.ml-1
= form.text_field :push_events_branch_filter, class: 'form-control', placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)'
%p.text-muted.ml-1
This URL will be triggered by a push to the repository
= form.text_field :push_events_branch_filter, class: 'form-control', placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)'
%li
= form.check_box :tag_push_events, class: 'form-check-input'
= form.label :tag_push_events, class: 'list-label form-check-label ml-1' do
%strong Tag push events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when a new tag is pushed to the repository
%li
= form.check_box :note_events, class: 'form-check-input'
= form.label :note_events, class: 'list-label form-check-label ml-1' do
%strong Comments
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when someone adds a comment
%li
= form.check_box :confidential_note_events, class: 'form-check-input'
= form.label :confidential_note_events, class: 'list-label form-check-label ml-1' do
%strong Confidential Comments
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when someone adds a comment on a confidential issue
%li
= form.check_box :issues_events, class: 'form-check-input'
= form.label :issues_events, class: 'list-label form-check-label ml-1' do
%strong Issues events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when an issue is created/updated/merged
%li
= form.check_box :confidential_issues_events, class: 'form-check-input'
= form.label :confidential_issues_events, class: 'list-label form-check-label ml-1' do
%strong Confidential Issues events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when a confidential issue is created/updated/merged
%li
= form.check_box :merge_requests_events, class: 'form-check-input'
= form.label :merge_requests_events, class: 'list-label form-check-label ml-1' do
%strong Merge request events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when a merge request is created/updated/merged
%li
= form.check_box :job_events, class: 'form-check-input'
= form.label :job_events, class: 'list-label form-check-label ml-1' do
%strong Job events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when the job status changes
%li
= form.check_box :pipeline_events, class: 'form-check-input'
= form.label :pipeline_events, class: 'list-label form-check-label ml-1' do
%strong Pipeline events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when the pipeline status changes
%li
= form.check_box :wiki_page_events, class: 'form-check-input'
= form.label :wiki_page_events, class: 'list-label form-check-label ml-1' do
%strong Wiki Page events
%p.light.ml-1
%p.text-muted.ml-1
This URL will be triggered when a wiki page is created/updated
.form-group
= form.label :enable_ssl_verification, 'SSL verification', class: 'label-bold checkbox'
Loading
Loading
---
title: Decouple Webhooks from Integrations within Project > Settings
merge_request: 23136
author:
type: changed
---
title: Allow group/project board to be queried by ID via GraphQL
merge_request: 24825
author:
type: added
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