With GitHub, I can write a commit message like
Create controllers for #1. and this would add a comment to the issue with a link back to the changeset.
The current behavior is inconsistent because a link to the issue is created in the commit message but there is link to the commit in the issue. It's very frustrating.
According to the documentation, we must use: