MDLSITE-3645 small fix to the commit url template

1) Only use the commit url template when its defined
2) Use the same naming scheme as the diffurl