Automated builds and which Git ref triggered them

Hi,

This is likely a really dumb question, but I swear I cannot find an answer in the docs. If I want to take advantage of automated builds via Docker Hub, I see that the Dockerfile is copied, but I see no evidence that the sources are, which is fine, but if they aren’t is there at least a way that I can determine which Git ref triggered the build so I can clone that during the build process?

Thank you!