hanoii / platformsh2slack

An adapter from platform.sh webhook to slack incoming webhook that can be hosted on a platform.sh app.
20 stars 5 forks source link

Fix missing filename in JSON debug #4

Closed jameswilson closed 5 years ago

jameswilson commented 5 years ago

The $filename variable is not yet defined inside the switch statement therefore the notification message in Slack is empty.

The fix is simply to move the attach() command down into the if statement after the switch where the $filename variable has already been instantiated and can be used.