Skip to content

Commit 11d5745

Browse files
committed
Return nil from get_asana_user_id_for_github_handle when not found
1 parent 1b23e82 commit 11d5745

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/fastlane/plugin/ddg_apple_automation/helper/asana_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def self.get_asana_user_id_for_github_handle(github_handle)
118118

119119
if asana_user_id.nil? || asana_user_id.to_s.empty?
120120
UI.message("Asana User ID not found for GitHub handle: #{github_handle}")
121+
nil
121122
else
122123
Helper::GitHubActionsHelper.set_output("asana_user_id", asana_user_id)
123124
asana_user_id
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module DdgAppleAutomation
3-
VERSION = "3.1.4"
3+
VERSION = "3.1.5"
44
end
55
end

spec/asana_helper_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ def get_release_automation_subtask_id(task_url)
183183

184184
it "shows warning when handle does not exist" do
185185
expect(Fastlane::UI).to receive(:message).with("Asana User ID not found for GitHub handle: chicken")
186-
get_asana_user_id_for_github_handle("chicken")
186+
expect(get_asana_user_id_for_github_handle("chicken")).to eq(nil)
187187
end
188188

189189
it "shows warning when handle is nil" do
190190
expect(Fastlane::UI).to receive(:message).with("Asana User ID not found for GitHub handle: pigeon")
191-
get_asana_user_id_for_github_handle("pigeon")
191+
expect(get_asana_user_id_for_github_handle("pigeon")).to eq(nil)
192192
end
193193

194194
it "shows warning when handle is empty" do
195195
expect(Fastlane::UI).to receive(:message).with("Asana User ID not found for GitHub handle: hawk")
196-
get_asana_user_id_for_github_handle("hawk")
196+
expect(get_asana_user_id_for_github_handle("hawk")).to eq(nil)
197197
end
198198

199199
def get_asana_user_id_for_github_handle(github_handle)

0 commit comments

Comments
 (0)