Full SHA for build notifications

I am creating a Slack notification for my build and I need the full commit SHA to generate some links. The only variable I see in the documentation is commit, which is a shortened SHA. However, I need the full SHA. Is there a variable, perhaps undocumented, that contains the full SHA?

Thanks

TRAVIS_COMMIT has a full SHA.

Is travis_commit available for interpolation into the notification templates?

$TRAVIS_COMMIT (Bash syntax) should work.

It did not work. I ended up just getting an empty string for the sha. This is a sample of the syntax I used:

notifications:
  slack:
    - rooms:
        - myroom
      template:
        - <https://testserver/?sha=%{$TRAVIS_COMMIT}|Try on Staging>

I also tried:
<https://testserver/?sha=$TRAVIS_COMMIT|Try on Staging>
But that just directly included $TRAVIS_COMMIT and did not try any interpolation.

Quick ping on this. Is there anything else I can try?

Configuring Build Notifications - Travis CI has an example but it doesn’t have a list of available variables. That’s all I could find.

Imprint