Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

address rubocop comments

Markus Kahl9e65bca60995
diff --git a/modules/github_integration/app/components/deploy_targets/row_component.rb b/modules/github_integration/app/components/deploy_targets/row_component.rb
index b17462f0947..7d06e9dc506 100644
--- a/modules/github_integration/app/components/deploy_targets/row_component.rb
+++ b/modules/github_integration/app/components/deploy_targets/row_component.rb
@@ -29,7 +29,7 @@
#++
module DeployTargets
- class RowComponent < ::RowComponent
+ class RowComponent < ::RowComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
property :host, :type
def deploy_target
diff --git a/modules/github_integration/app/components/deploy_targets/table_component.rb b/modules/github_integration/app/components/deploy_targets/table_component.rb
index a1f49cad49b..2cd46d501f2 100644
--- a/modules/github_integration/app/components/deploy_targets/table_component.rb
+++ b/modules/github_integration/app/components/deploy_targets/table_component.rb
@@ -29,7 +29,7 @@
#++
module DeployTargets
- class TableComponent < ::TableComponent
+ class TableComponent < ::TableComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
columns :host, :type, :created_at
options :current_user
diff --git a/modules/github_integration/app/controllers/deploy_targets_controller.rb b/modules/github_integration/app/controllers/deploy_targets_controller.rb
index 32599b70260..ed64c7d88fb 100644
--- a/modules/github_integration/app/controllers/deploy_targets_controller.rb
+++ b/modules/github_integration/app/controllers/deploy_targets_controller.rb
@@ -48,11 +48,11 @@ class DeployTargetsController < ApplicationController
@deploy_target = DeployTarget.create **args
if @deploy_target.persisted?
- flash[:success] = "Deploy target created"
+ flash[:success] = I18n.t(:notice_deploy_target_created)
redirect_to deploy_targets_path
else
- render 'new'
+ render "new"
end
end
@@ -61,7 +61,7 @@ class DeployTargetsController < ApplicationController
deploy_target.destroy!
- flash[:success] = "Deploy target deleted"
+ flash[:success] = I18n.t(:notice_deploy_target_destroyed)
redirect_to deploy_targets_path
end
diff --git a/modules/github_integration/spec/factories/deploy_target_factory.rb b/modules/github_integration/spec/factories/deploy_target_factory.rb
index a40895a43ad..42fcf21bd5e 100644
--- a/modules/github_integration/spec/factories/deploy_target_factory.rb
+++ b/modules/github_integration/spec/factories/deploy_target_factory.rb
@@ -32,6 +32,6 @@ FactoryBot.define do
sequence(:host) { |n| "https://qa-#{n}.openproject-edge.com" }
- api_key { '4p1k3y' }
+ api_key { "4p1k3y" }
end
end
diff --git a/modules/github_integration/spec/requests/extended_root_resource_spec.rb b/modules/github_integration/spec/requests/extended_root_resource_spec.rb
index d380dfde3b9..03422d4e26e 100644
--- a/modules/github_integration/spec/requests/extended_root_resource_spec.rb
+++ b/modules/github_integration/spec/requests/extended_root_resource_spec.rb
@@ -59,7 +59,7 @@ RSpec.describe "API v3 Root resource with the github integration extension", wit
end
it "responds with 200" do
- expect(response.status).to eq(200)
+ expect(response.status).to eq(200) # rubocop:disable RSpecRails/HaveHttpStatus
end
it "does not include the core SHA in the res" do
@@ -79,11 +79,11 @@ RSpec.describe "API v3 Root resource with the github integration extension", wit
end
it "responds with 200" do
- expect(response.status).to eq(200)
+ expect(response.status).to eq(200) # rubocop:disable RSpecRails/HaveHttpStatus
end
it "does includes the core SHA in the response" do
- expect(subject).to be_json_eql(core_sha.to_json ).at_path("coreSha")
+ expect(subject).to be_json_eql(core_sha.to_json).at_path("coreSha")
end
end
end