Skip to content

Commit

Permalink
cleanup, add rubocop disable
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHuynh333 committed Dec 4, 2024
1 parent 7a332a0 commit 448c1ca
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions app/components/bots/table_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Bots
class TableComponent < Component
include Ransack::Helpers::FormHelper

# rubocop: disable Metrics/ParameterLists
def initialize(
bot_accounts,
namespace,
Expand All @@ -22,6 +23,7 @@ def initialize(
@empty = empty
@system_arguments = system_arguments
end
# rubocop: enable Metrics/ParameterLists

private

Expand All @@ -48,21 +50,5 @@ def destroy_path(bot)
namespace_project_bot_path(id: bot.id)
end
end

def revoke_path(token)
if @namespace.is_a?(Group)
revoke_group_bot_personal_access_token_path(
bot_id: @bot_account.id,
id: token.id
)
elsif @namespace.is_a?(Namespaces::ProjectNamespace)
revoke_namespace_project_bot_personal_access_token_path(
bot_id: @bot_account.id,
id: token.id
)
else
revoke_profile_personal_access_token_path(id: token.id)
end
end
end
end

0 comments on commit 448c1ca

Please sign in to comment.