We currently do most of the logic using the branch name, which, for now does not cause any major issues but might interfere with future changes. We should only use the branch name to deduce the actual commit hash, and use that thereafter. Would greatly ease implementation of #342 #343