Hello Jonathan,
You'll need to use the go revision environment variable and get it. There are two reasons for this:
1. There can be multiple repositories (dependencies) to a pipeline, and each can have its own commit messages. So, only one cannot be chosen, for instance.
2. Multiple commits can lead to a pipeline run. If you merged in a branch, for instance, then multiple commits would have led to this build. Ostensibly, the top commit is only one, but the commit messages which led to this could be multiple.
So, you'll need to do something along the lines of:
git log -n 1 --format=format:%B GO_REVISION
To really get all the commits that led to this pipeline run, you'll need to do something like:
git log GO_FROM_REVISION..GO_TO_REVISION
Hope that makes sense. Thinking about this, I can see how the top commit message could be useful, if it was in an environment variable, but it isn't.
Regards,
Aravind