2

I was wondering how to display the commit message and committing user for a HipChat bot commit to a deployment hook for Heroku. I know this is the basic setup:

heroku addons:add deployhooks:hipchat \
    --auth_token=my_auth_token \
    --room="My Company's Room"

Would the new Heroku command would probably be something like:

heroku addons:add deployhooks:hipchat \
    --auth_token=my_auth_token \
    --room="My Company's Room"
    --user=<<user goes here>>
    --message=<<commit message goes here>>

Long story short, when the HipChat bot is updated, how can I send the commit message to the room, and show which user made the commit? I also know I'm not "adding" the add-on. What should I change "add" to?

Mez
  • 24,430
  • 14
  • 71
  • 93
user1114864
  • 1,734
  • 6
  • 26
  • 37

1 Answers1

1

You should have a look at Heroku's docs on customising the message.

You have the following variables available for customising the message:

app:       the app name
user:      email of the user deploying the app
url:       the app URL (http://myapp.heroku.com or http://mydomain.com if you have custom domains enabled)
head:      short identifier of the latest commit (first seven bytes of the SHA1 git object name)
head_long: full identifier of the latest commit
git_log:   log of commits between this deploy and the last

You add these to the message, for example, {{head_log}}.

You will need to either remove the addon and add it again using the heroku command line client, or you can edit the message through Heroku's web interface.

jordelver
  • 8,292
  • 2
  • 32
  • 40
  • Maybe I wasn't clear, but I'm not sure how to make the "message" portion of the addon dynamic, and have it show the associated commit message. – user1114864 Mar 14 '14 at 19:04
  • I think I do understand, but I've updated my answer. I think you need `head_long`. – jordelver Mar 15 '14 at 13:48