Only update commit hash if its the pure repo source
fixed updated field name
if not repository source ID is set on the project/build assume master