Skip to content

Commit

Permalink
Fix duplicated (AKA overriding) before_action call
Browse files Browse the repository at this point in the history
  • Loading branch information
ncounter committed Mar 25, 2024
1 parent 8ca6c23 commit db05670
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/app/controllers/webui/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Webui::RequestController < Webui::WebuiController
changes mentioned_issues chart_build_results complete_build_results]
before_action :set_actions, only: %i[inline_comment show build_results rpm_lint changes mentioned_issues chart_build_results complete_build_results request_action_changes],
if: -> { Flipper.enabled?(:request_show_redesign, User.session) }
before_action :set_actions, only: [:show]
before_action :set_actions_deprecated, only: [:show]
before_action :build_results_data, only: [:show], if: -> { Flipper.enabled?(:request_show_redesign, User.session) }
before_action :set_action, only: %i[inline_comment show build_results rpm_lint changes mentioned_issues],
if: -> { Flipper.enabled?(:request_show_redesign, User.session) }
Expand Down Expand Up @@ -466,6 +466,12 @@ def set_actions
@actions = @bs_request.bs_request_actions
end

# [DEPRECATED] TODO: remove once request_workflow_redesign beta is rolled out
# This method exists in order to have a set_actions in before_action for non beta too
def set_actions_deprecated
set_actions
end

def build_results_data
ActionBuildResultsService::ChartDataExtractor.new(actions: @actions).call
end
Expand Down

0 comments on commit db05670

Please sign in to comment.