wantedly / step-pretty-slack-notify

Posts wercker build/deploy status to a Slack channel
MIT License
88 stars 34 forks source link

Set default username correctly #43

Closed spesnova closed 7 years ago

spesnova commented 7 years ago

What does this PR do?

Fix the bug which set empty username as default. This was produced by me when I refactored this 😭

(this image is from this comment: https://github.com/wantedly/step-pretty-slack-notify/issues/40#issuecomment-264254421)

As you can see above, wercker sets "" to WERCKER_PRETTY_SLACK_NOTIFY_USERNAME if username option is not specified. Then default username is set to "".

username       = ENV["WERCKER_PRETTY_SLACK_NOTIFY_USERNAME"]       || "Wercker"
# => ""

Motivation

To fix Username does not default to Wercker · Issue #40 · wantedly/step-pretty-slack-notify

dtan4 commented 7 years ago

LGTM 👍 Thanks ❗️