Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 660ae28

Browse files
committed
github-commit-link: Only show the first line of the commit
This is traditionally the message summary. From Git's own docs [1]: > The first line of the commit message should be a short description > (50 characters is the soft limit, see DISCUSSION in git-commit(1)), > and should skip the full stop. I sometimes write long, detailed commit messages (like this one), and there's no need to spam the channel with all of this motivational background. The summary line should be sufficient context there, and folks looking for more information can follow the URL (which I've moved to it's own line). [1]: https://github.com/git/git/blob/v1.9.0/Documentation/SubmittingPatches#L89
1 parent 111a329 commit 660ae28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/github-commit-link.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ module.exports = (robot) ->
5959
url = commit_obj.url.replace(/api\./,'')
6060
url = url.replace(/repos\//,'')
6161
url = url.replace(/commits/,'commit')
62-
msg.send "Commit: " + commit_obj.commit.message + " " + url
62+
msg.send "Commit: " + commit_obj.commit.message.split("\n")[0] + "\n" + url
6363
else
6464
msg.send "Hey! You need to set HUBOT_GITHUB_REPO and HUBOT_GITHUB_TOKEN before I can link to that commit."

0 commit comments

Comments
 (0)