post-receive: Include an abbrev sha1 in the message

(imported from commit 97eea18bb4426270d085e398680f1db8028235db)
This commit is contained in:
Keegan McAllister 2012-10-11 11:49:00 -04:00
parent 5a7ff70c11
commit b3c029472a
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ def process_push(oldrev, newrev, refname):
"type": "stream",
"stream": "test" if refname == "refs/heads/test-post-receive" else "devel",
"subject": "commits",
"content": "The following commits were just pushed to `%s`:\n\n"
% (refname.replace("refs/heads/", ""),) + commits,
"content": "`%s` was deployed to `%s` with:\n\n" % (newrev[:12], refname.replace("refs/heads/", ""))
+ commits,
"recipient": "tabbott@humbughq.com",
}
# Sleep a bit to give time for the server to restart.