Skip to content

Commit

Permalink
Make sure template is not being processed if it is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklyp committed Sep 5, 2024
1 parent f63e985 commit 66692b7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ def self.run(params)

task_id = Fastlane::Actions::AsanaExtractTaskIdAction.run(task_url: task_url) if task_url

if template_name
if template_name.to_s.empty?
text = "#{comment}\n\nWorkflow URL: #{workflow_url}"
create_story(asana_access_token, task_id, text: text)
else
template_content = load_template_file(template_name)
return unless template_content

html_text = process_template_content(template_content)
create_story(asana_access_token, task_id, html_text: html_text)
else
text = "#{comment}\n\nWorkflow URL: #{workflow_url}"
create_story(asana_access_token, task_id, text: text)
end
end

Expand Down

0 comments on commit 66692b7

Please sign in to comment.