You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix bug #196
The call to `empty?` will fail if the key GITHUB_HEAD_REF does not exist.
Before fixing this problem, I extracted the logic to its own testable class. Then I added tests, which also showed that `GITHUB_REF_NAME` would never be returned either (a previously unknown bug) because `!@env["GITHUB_HEAD_REF"]&.empty?` will always be truthy unless the key exists and it's empty.
This would (possibly) be cleaner with pattern matching. Ruby has pattern matching but we can't use it yet due to minimum supported Ruby version https://docs.ruby-lang.org/en/3.0/syntax/pattern_matching_rdoc.html.
Close#196
* v8.0.0
The env can be nil or an empty string introduced in a9d3dc5
We can fix with the lonely operator.
The text was updated successfully, but these errors were encountered: