Skip to content

Commit 4aea05b

Browse files
committed
Make rubocop happy
1 parent 8332e6d commit 4aea05b

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

lib/fastlane/plugin/ddg_apple_automation/actions/start_new_release_action.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "fastlane/action"
22
require "fastlane_core/configuration/config_item"
33
require "octokit"
4+
require_relative "asana_add_comment_action"
45
require_relative "../helper/asana_helper"
56
require_relative "../helper/ddg_apple_automation_helper"
67
require_relative "../helper/git_helper"
@@ -33,10 +34,12 @@ def self.run(params)
3334
options[:release_task_id] = release_task_id
3435

3536
Helper::AsanaHelper.update_asana_tasks_for_internal_release(options) unless params[:is_hotfix]
36-
Fastlane::Actions::AsanaAddCommentAction.run(
37-
task_id: release_task_id,
38-
comment: "TDS performance tests failed. Make sure to validate performance before releasing to public users."
39-
) if update_embedded_warning
37+
if update_embedded_warning
38+
Fastlane::Actions::AsanaAddCommentAction.run(
39+
task_id: release_task_id,
40+
comment: "TDS performance tests failed. Make sure to validate performance before releasing to public users."
41+
)
42+
end
4043
end
4144

4245
def self.description

spec/ddg_apple_automation_helper_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,23 +518,23 @@ def load_file(file)
518518
expect(Fastlane::Actions).to have_received(:sh).with("git", "commit", "-m", "Update embedded files")
519519
end
520520

521-
it "returns true when TDS performance tests fail" do
521+
it "returns true when TDS performance tests fail" do
522522
allow(Fastlane::Actions).to receive(:sh).with("./scripts/update_embedded.sh").and_return("")
523523
git_status_output = "On branch main\nmodified: Core/trackerData.json\n"
524524
allow(Fastlane::Actions).to receive(:sh).with("git", "status").and_return(git_status_output)
525525
allow(Fastlane::Actions).to receive(:sh).with("git", "add", "Core/trackerData.json").and_return("")
526526
allow(Fastlane::Actions).to receive(:sh).with("git", "commit", "-m", "Update embedded files").and_return("")
527527
allow(other_action).to receive(:tds_perf_test).and_return(false)
528528
allow(other_action).to receive(:ensure_git_status_clean)
529-
529+
530530
result = described_class.update_embedded_files(platform, other_action)
531-
531+
532532
expect(result).to eq(true)
533533
expect(Fastlane::Actions).to have_received(:sh).with("git", "status")
534534
expect(Fastlane::Actions).to have_received(:sh).with("git", "add", "Core/trackerData.json")
535535
expect(Fastlane::Actions).to have_received(:sh).with("git", "commit", "-m", "Update embedded files")
536536
end
537-
537+
538538
it "returns false when TDS performance tests pass" do
539539
allow(Fastlane::Actions).to receive(:sh).with("./scripts/update_embedded.sh").and_return("")
540540
git_status_output = "On branch main\nmodified: Core/trackerData.json\n"
@@ -545,7 +545,7 @@ def load_file(file)
545545
allow(other_action).to receive(:ensure_git_status_clean)
546546

547547
result = described_class.update_embedded_files(platform, other_action)
548-
548+
549549
expect(result).to eq(false)
550550
expect(Fastlane::Actions).to have_received(:sh).with("git", "status")
551551
expect(Fastlane::Actions).to have_received(:sh).with("git", "add", "Core/trackerData.json")

spec/start_new_release_action_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
allow(Fastlane::Actions::AsanaAddCommentAction).to receive(:run)
9292
end
9393
it 'warns about TDS performance tests failures' do
94-
9594
subject
9695
expect(Fastlane::Actions::AsanaAddCommentAction).to have_received(:run).with(
9796
hash_including(

0 commit comments

Comments
 (0)