Fix typo
Extract the function to generate a URL of a commit in GitHub

For tests. Tests may be added by the next commit.