Shopify/smart_todo

Check for blank environment variables

Opened this issue · 0 comments

I was pairing with @wildmaples to add this to our CI, and it was failing with:

read:0x00007f579f41cb18 /usr/local/bundle/ruby/3.2.0/gems/smart_todo-1.7.0/lib/smart_todo/cli.rb:121 run> terminated with exception (report_on_exception is true):
--
  | /usr/local/bundle/ruby/3.2.0/gems/smart_todo-1.7.0/lib/smart_todo/slack_client.rb:97:in `slack_response!': Response body: {"ok"=>false, "error"=>"not_authed"} (SmartTodo::SlackClient::Error)

It turned out we were setting SMART_TODO_SLACK_TOKEN, but it was evaluating to an empty string 🙊 . I think it's a simple adjustmen to check for it to be non-empty.