Class: Integrations::SlackInteractions::SlackBlockActions::IncidentManagement::ProjectUpdateHandler

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/integrations/slack_interactions/slack_block_actions/incident_management/project_update_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(params, action) ⇒ ProjectUpdateHandler

Returns a new instance of ProjectUpdateHandler.



10
11
12
13
14
15
# File 'app/services/integrations/slack_interactions/slack_block_actions/incident_management/project_update_handler.rb', line 10

def initialize(params, action)
  @view = params[:view]
  @action = action
  @team_id = params.dig(:view, :team_id)
  @user_id = params.dig(:user, :id)
end

Instance Method Details

#executeObject



17
18
19
20
21
22
# File 'app/services/integrations/slack_interactions/slack_block_actions/incident_management/project_update_handler.rb', line 17

def execute
  return if project_unchanged?
  return unless allowed?

  post_updated_modal
end