add function for auto-updating SHAs only in Jenkins (i.e., when HEAD is detached)