Add commit message to env comment

This commit is contained in:
connor rigby 2018-01-04 12:08:56 -08:00
parent c26743612d
commit 867bae5bf4

View file

@ -70,10 +70,15 @@ defmodule Mix.Tasks.Farmbot.Env do
> *_Version_*: `#{mix_config(:version)}`
> *_Commit_*: `#{mix_config(:commit)}`
> *_Time_*: `#{time}`
#{commit_message()}
#{String.trim(comment)}
"""
end
defp commit_message do
System.cmd("git", ~w(log -1 --pretty=%B)) |> elem(0) |> String.trim()
end
@doc false
def slack_token do
System.get_env("SLACK_TOKEN") || Mix.raise "No $SLACK_TOKEN environment variable."