Skip to content

Commit

Permalink
Replace user error with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklyp committed Sep 2, 2024
1 parent 531281d commit 6ed05f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.run(params)
asana_user_id = user_mapping[github_handle]

if asana_user_id.nil? || asana_user_id.to_s.empty?
UI.user_error!("Asana User ID not found for GitHub handle: #{github_handle}")
UI.warning("Asana User ID not found for GitHub handle: #{github_handle}")
else
Helper::GitHubActionsHelper.set_output("user-id", asana_user_id)
asana_user_id
Expand Down
6 changes: 3 additions & 3 deletions spec/asana_get_user_id_for_github_handle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
end

it "shows error when handle does not exist" do
expect(Fastlane::UI).to receive(:user_error!).with("Asana User ID not found for GitHub handle: chicken")
expect(Fastlane::UI).to receive(:warning).with("Asana User ID not found for GitHub handle: chicken")
test_action("chicken")
end

it "shows error when handle is nil" do
expect(Fastlane::UI).to receive(:user_error!).with("Asana User ID not found for GitHub handle: pigeon")
expect(Fastlane::UI).to receive(:warning).with("Asana User ID not found for GitHub handle: pigeon")
test_action("pigeon")
end

it "shows error when handle is empty" do
expect(Fastlane::UI).to receive(:user_error!).with("Asana User ID not found for GitHub handle: hawk")
expect(Fastlane::UI).to receive(:warning).with("Asana User ID not found for GitHub handle: hawk")
test_action("hawk")
end
end
Expand Down

0 comments on commit 6ed05f6

Please sign in to comment.